A Guide to SQL, Eighth Edition
Solutions 1-1
Chapter 1: An Introduction to Premiere Products, Henry Books, and Alexamara Marina Group Solutions Answers to Review Questions Due to the nature of the material in Chapter 1, there are no Review Questions.
Answers to Premiere Products Exercises 1. +---------------------------+ | CUSTOMER_NAME | +---------------------------+ | Al's Appliance and Sport | | Ferguson's | | The Everything Shop | | Lee's Sport and Appliance | | Deerfield's Four Seasons | | All Season | +---------------------------+
2.
+-----------+ | ORDER_NUM | +-----------+ | 21617 | | 21623 | +-----------+
3.
+----------+-------------+---------------+ | PART_NUM | DESCRIPTION | ON_HAND_VALUE | +----------+-------------+---------------+ | BV06 | Home Gym | 35772.75 | | KV29 | Treadmill | 12510.00 | +----------+-------------+---------------+
4.
+----------+----------------+ | PART_NUM | DESCRIPTION | +----------+----------------+ | AT94 | Iron | | DL71 | Cordless Drill | | FD21 | Stand Mixer | +----------+----------------+
5.
2
6.
+----------+-------------+-------+ | PART_NUM | DESCRIPTION | PRICE | +----------+-------------+-------+ | AT94 | Iron | 24.95 | +----------+-------------+-------+
7.
+-----------+------------+--------------+----------------------------+
A Guide to SQL, Eighth Edition | ORDER_NUM | ORDER_DATE | CUSTOMER_NUM | CUSTOMER_NAME | +-----------+------------+--------------+----------------------------+ | 21608 | 2010-10-20 | 148 | Al's Appliance and Sport | | 21610 | 2010-10-20 | 356 | Ferguson's | | 21613 | 2010-10-21 | 408 | The Everything Shop | | 21614 | 2010-10-21 | 282 | Brookings Direct | | 21617 | 2010-10-23 | 608 | Johnson's Department Store | | 21619 | 2010-10-23 | 148 | Al's Appliance and Sport | | 21623 | 2010-10-23 | 608 | Johnson's Department Store | +-----------+------------+--------------+----------------------------+
8.
+-----------+--------------+---------------------+ | ORDER_NUM | CUSTOMER_NUM | CUSTOMER_NAME | +-----------+--------------+---------------------+ | 21613 | 408 | The Everything Shop | | 21614 | 282 | Brookings Direct | +-----------+--------------+---------------------+
9.
+---------+------------+-----------+ | REP_NUM | FIRST_NAME | LAST_NAME | +---------+------------+-----------+ | 35 | Richard | Hull | | 65 | Juan | Perez | +---------+------------+-----------+
10.
+-----------+----------+-------------+-------+ | ORDER_NUM | PART_NUM | DESCRIPTION | CLASS | +-----------+----------+-------------+-------+ | 21613 | KL62 | Dryer | AP | | 21614 | KT03 | Dishwasher | AP | +-----------+----------+-------------+-------+
Answers to Henry Books Exercises 1.
+--------------------------+ | PUBLISHER_NAME | +--------------------------+ | Arcade Publishing | | Back Bay Books | | Fawcett Books | | Farrar Straus and Giroux | | HarperCollins Publishers | | Jove Publications | | Lb Books | | Penguin USA | | Plume | | Putnam Publishing Group | | Random House | | Schoken Books | | Scribner | | Simon and Schuster | | Scholastic Trade | | Tor Books | | Thames and Hudson | | Vintage Books | | W.W. Norton | +--------------------------+
2.
+-----------------+ | BRANCH_NAME | +-----------------+ | Henry Downtown | | Henry Brentwood | | Henry Eastshore | +-----------------+
3.
Solutions 1-2
A Guide to SQL, Eighth Edition +-----------+------------------------+ | BOOK_CODE | TITLE | +-----------+------------------------+ | 0200 | The Stranger | | 138X | Beloved | | 2766 | Of Mice and Men | | 3743 | Nine Stories | | 5790 | Catch-22 | | 6128 | Jazz | | 6908 | Franny and Zooey | | 7405 | East of Eden | | 7559 | The Fall | | 9627 | Song of Solomon | | 9701 | The Grapes of Wrath | | 9883 | The Catcher in the Rye | | 9931 | To Kill a Mockingbird | +-----------+------------------------+
4.
+-----------+------------------------+ | BOOK_CODE | TITLE | +-----------+------------------------+ | 0200 | The Stranger | | 138X | Beloved | | 2766 | Of Mice and Men | | 3743 | Nine Stories | | 5790 | Catch-22 | | 6128 | Jazz | | 6908 | Franny and Zooey | | 7405 | East of Eden | | 7559 | The Fall | | 9627 | Song of Solomon | | 9701 | The Grapes of Wrath | | 9883 | The Catcher in the Rye | +-----------+------------------------+
5.
+-----------+------------------------+ | BOOK_CODE | TITLE | +-----------+------------------------+ | 0200 | The Stranger | | 1351 | Dreamcatcher: A Novel | | 138X | Beloved | | 2766 | Of Mice and Men | | 3743 | Nine Stories | | 5790 | Catch-22 | | 6128 | Jazz | | 6908 | Franny and Zooey | | 7405 | East of Eden | | 7559 | The Fall | | 9627 | Song of Solomon | | 9701 | The Grapes of Wrath | | 9883 | The Catcher in the Rye | | 9931 | To Kill a Mockingbird | +-----------+------------------------+
6.
+-----------+-----------+ | BOOK_CODE | TITLE | +-----------+-----------+ | 0808 | The Edge | | 9882 | Slay Ride | +-----------+-----------+
7.
+-----------+------------------------------------------+------------------+ | BOOK_CODE | TITLE | DISCOUNTED_PRICE | +-----------+------------------------------------------+------------------+ | 0180 | A Deepness in the Sky | 6.47 | | 0189 | Magic Terror | 7.19 | | 0200 | The Stranger | 7.20 | | 0378 | Venice | 22.05 | | 079X | Second Wind | 22.45 |
8.
Solutions 1-3
A Guide to SQL, Eighth Edition +--------------------------+ | PUBLISHER_NAME | +--------------------------+ | Farrar Straus and Giroux | | McPherson and Co. | | Simon and Schuster | | Thames and Hudson | +--------------------------+
9.
+-----------+------------------------+ | BOOK_CODE | TITLE | +-----------+------------------------+ | 0200 | The Stranger | | 0378 | Venice | | 079X | Second Wind | | 0808 | The Edge | | 1382 | Treasure Chests | | 138X | Beloved | | 2281 | Van Gogh and Gauguin | | 2766 | Of Mice and Men | | 3743 | Nine Stories | | 5790 | Catch-22 | | 6128 | Jazz | | 6908 | Franny and Zooey | | 7405 | East of Eden | | 7559 | The Fall | | 9627 | Song of Solomon | | 9701 | The Grapes of Wrath | | 9882 | Slay Ride | | 9883 | The Catcher in the Rye | | 9931 | To Kill a Mockingbird | +-----------+------------------------+
10. 11.
3 $23.32
12.
+-----------+----------------------+ | BOOK_CODE | TITLE | +-----------+----------------------+ | 2766 | Of Mice and Men | | 5163 | Travels with Charley | | 7405 | East of Eden | | 9701 | The Grapes of Wrath | +-----------+----------------------+
13.
+-----------+------------------------------------------+---------+ | BOOK_CODE | TITLE | ON_HAND | +-----------+------------------------------------------+---------+ | 0378 | Venice | 2 | | 079X | Second Wind | 2 | | 1351 | Dreamcatcher: A Novel | 2 | | 2226 | Harry Potter and the Prisoner of Azkaban | 2 | | 2766 | Of Mice and Men | 2 | | 3906 | The Soul of a New Machine | 2 | | 6128 | Jazz | 3 | | 7405 | East of Eden | 2 | | 8092 | Godel, Escher, Bach | 1 | | 9627 | Song of Solomon | 5 | | 9701 | The Grapes of Wrath | 3 | | 9882 | Slay Ride | 3 | +-----------+------------------------------------------+---------+
Answers to Alexamara Marina Group Exercises
Solutions 1-4
A Guide to SQL, Eighth Edition 1.
+-----------+-----------+----------------+ | OWNER_NUM | LAST_NAME | FIRST_NAME | +-----------+-----------+----------------+ | AD57 | Adney | Bruce and Jean | | AN75 | Anderson | Bill | | BL72 | Blake | Mary | | EL25 | Elend | Sandy and Bill | | FE82 | Feenstra | Daniel | | JU92 | Juarez | Maria | | KE22 | Kelly | Alyssa | | NO27 | Norton | Peter | | SM72 | Smeltz | Becky and Dave | | TR72 | Trent | Ashton | +-----------+-----------+----------------+
2.
+-----------+-----------+----------------+ | OWNER_NUM | LAST_NAME | FIRST_NAME | +-----------+-----------+----------------+ | AD57 | Adney | Bruce and Jean | | BL72 | Blake | Mary | | KE22 | Kelly | Alyssa | +-----------+-----------+----------------+
3.
+------------+----------+ | MARINA_NUM | SLIP_NUM | +------------+----------+ | 1 | B1 | | 1 | B2 | | 2 | 1 | | 2 | 2 | | 2 | 3 | | 2 | 4 | +------------+----------+
4.
+------------+----------+ | MARINA_NUM | SLIP_NUM | +------------+----------+ | 1 | B1 | | 2 | 4 | +------------+----------+
5.
+----------+ | SLIP_NUM | +----------+ | B1 | +----------+
6.
+--------------+ | BOAT_NAME | +--------------+ | Gypsy | | Anderson III | | Bravo | | Chinook | | Listy | | Mermaid | +--------------+
7.
+----------+ | SLIP_NUM | +----------+ | B1 | | B2 | +----------+
8.
+---------+--------------+-----------+----------------+ | SLIP_ID | CATEGORY_NUM | EST_HOURS | ESTIMATED_COST | +---------+--------------+-----------+----------------+
Solutions 1-5