Question: CUSTOMER EMP INVOICE LINE P CODE V CODE CUS CODE EMP CODE NV NUMBER NV NUMBER, LINE NUMBER Create SQL queries for displaying the following

 CUSTOMER EMP INVOICE LINE P CODE V CODE CUS CODE EMPCODE NV NUMBER NV NUMBER, LINE NUMBER Create SQL queries for displayingthe following results 5. List the customers who have ordered product bearing

CUSTOMER EMP INVOICE LINE P CODE V CODE CUS CODE EMP CODE NV NUMBER NV NUMBER, LINE NUMBER Create SQL queries for displaying the following results 5. List the customers who have ordered product bearing product code "23109-HB. Display first names, last names of customers, invoice numbers and product codes 6. Display Vendor details (V_CODE, V NAME) and product details (P CODE, P DESCRIPT) and product quantity on hand in excess of product min quantity (give alias of Quantity above Minimum) for products where Quantity above Minimum' is less than 10 items. Sort result in the ascending order of Quantity above Minimum . For each product invoiced on 01-16-2010 display the product details (P CODE, P DESCRIPT),invoice date and the total number of items sold (give suitable column title) along with the total amount of sales (give suitable column title and sort the results on this field) There should be one row displayed per Product 8. For each vendor based in Tennessee (TN) display the Vendor details (V CODE, V NAME, V STATE) and the total number of items sold (give suitable column title) along with the total amount of sales (give suitable column title and sort the results on this field). There should be one row displayed per Vendor 9 Who are the customers with no invoices placed. Display last name, first name, customer balance for these 10. Display first and last name(s) of customers who have bought the product with the highest price? in Submission Requirements You will upload word file to the Moodle by the due date and time that shows the screenshots of each query followed by the result. Above each query, please write your full name as a comment. Also, write your name, course number, and the semester name on the coversheet Make sure that you increase the size of the T-SQL results section at the bottom of Visual Studio's SQLQuery window to show all rows of your result set as some queries display several rows Solve the problems in the order in which they are listed in the assignment. Indicate the question number before each query TABLE P P DESCRIPT P.INDATE P.QOH P MIN P PRICE P DISCOUNT V CODE P MIN ORDER P REORDER QER/31 Power painter, 15ps3nozzle 2009-11-03 00:00 00 000 8 3-02/P2725n pwr saw blade 4013 9.00n pr saw biade 546-002 Hrd. coth, 1/44n 250 2009-12-13 00 0000 000 32 2005-11-13 000000 .000 18 2010-01-15 00 0000 .000 15 2010-01-15 000000 .000 23 009-12-30 00 0000 000 009-12-24 00 00 00 000 2010-01-20 00:00.00.000 125 2010-01-20 000000.000 2 2010-01-02 00 00 00.000 009-12-15 00 00 00 .000 43204 000 2010-02-07 00 00100 0001 2010-02-20 00 0000 000 188 75 58 2010-03-01 0000 00 000 17275699000 2010-02-24 00 0000 000 237 100 845 0999 0.00 1499 005 749 000 995 0.00 43.99 000 09 92 005 9987 005 895 005 10 995 010 1440 005 25595 25 134450 1344 50 3119 35 23119 25 24288 15 24288 15 25595 12 21225 25 NULL 12 21344 25 24288 10 NULL 50 21225 50 21231 100 25595 10 15 232/QTY BADw, 12in blade 3109-HB Clew hammer 3114AA Slede hanmer, 12 S-WREQ Hiout chain saw, 16 in M-18277125n metal sorew,25 25699 005 W 23116 25nd screw, 50 WR3/TT3 Steelmatting, 4xBx1/652010-01-17 00:00 00 00018 995 0.10 TABLE V CODE V NAME 21225 Bryson, Inc 21226 SuperLoo, Inc. Rlushing 23 D&E Supply 21344 Gomez Bros 22567 Dome Supply Smith 23119 Randsets Ltd 24004 Brackman Bros. Browning 615 24288 ORDVA, Inc. 25443 B&K, Inc. 25501 Damal Supplies Smythe 25595 Rubicon Systems Orton V CONTACT V AREACODE V PHONE V STATE V ORDER 223-3234 TN 215-8995 FL 228-3245 TN 889-2546 KY 678-1419 GA 678-3998 GA 228-1410TN 98-1234 TN 227-0093 FL 890-3529 TN 456-0092 FL 901 Anderson 901 TABLE INVOICE NV NUMBER CUS CODE INV DATE 1001 1002 1003 1004 1005 1006 1007 0014 10011 10012 10011 10018 10014 10015 2010-01-16 00:00:00.000 2010-01-16 00:00:00.000 2010-01-16 00:00:00.000 2010-01-17 00:00:00.000 2010-01-17 00:00:00.000 2010-01-17 00:00:00.000 2010-01-17 00:00:00.000 TABLE LINE INV NUMBER LINE NUMBER P CODE 1001 1001 1002 1003 1003 1003 1004 1004 1005 1006 1006 1006 1006 1007 1007 1008 1008 1008 LINE UNITS LINE_PRICE 3Q2/P2 1.00 3109-HB 1.00 54778-2T 2.00 2238/QPD 1.00 1546Q02 1.00 3-Q2/P2 5.00 4778-2T 3.00 23109-HB 200 PVC23DRT 12.00 SM-182773.00 2232/QTY 1.00 23109-HB 1.00 89-WREQ 1.00 3Q2/P2 200 4778-2T 1.00 PVC23DRT 5.00 WR3/TT3 3.00 23109-HB 1.00 14.99 38.95 39.95 109.92 256.99 4.99 119.95 TABLE EMP EMP NUM EMP TITLE EMP LNAME EMP FNAME EMP INITIAL EMP DO8 EMP HIRE TE EMP AREACODE EMP PHONE EMP_MGR Kolmycz George 1942-06-15 0000 00.000 1985-03-15 00 00:00 000 61 1965-03-19 0000 00.000 1986 04-25 00:0000 000 615 958-11-14 00-00 00.000 1990-12-20 00 00 00 000 901 974-10-16 00 00 00.000 199408 28 00 00 00 000 615 1971-11-08 00 00 00 000 1994 1020 00-00-00 000 901 19750314000000000 1996-11-08000000 615 968-02-12 00 00:00.000 1989 01-05 0000 00.000 615 974-08-21 00 00 00.000 1994-07-02 00 00:00 000 615 1966-02-14 00-00-00.000 1992-11-18 00 00 00 000 615 1961-06-18 00-0000.000 198904-14 00-00 00 000 901 970-05-19 00 00.00.000 1990-12-01 00 00:00.000 90 1966-01-03 0000.00.000 1993-06-21 00 00:00.000 615 1961-05-14 000000000 1983-12-01 000000000 615 970-09-15 00 00.00.000 1999-05-11 00:00:00.000 15 956-11-02 00 00.00.000 1979-11-15 00 00:00.000 90 1972-07-25 0000.00.000 1953-04-23 00 0000.000 615 1965-11-08 00 00.00.000 1988-12-10 00:00.00.000 615 24-4472 75-8993 98-3456 100 100 NULL 90-3220NULL 324-7883 Weserbach Pau 504-3335 110 690093108 Washington Rupert 112 113 114 115 116 249006 105 82-0845 108 890-2984 108 Table CUSTOMER CUS CODE CUS_LNAME CUS FNAME CUS INITIAL CUS AREACODE CUS PHONE CUS BALANCE 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 615 713 615 44-2573 894-1238 894-2285 894-2180 222-1672 442-3381 297-1228 290-2556 382-7185 297-3809 0.00 0.00 45.86 536.75 0.00 0.00 221.19 768.93 216.55 0.00 Paul NULL 615 713 O'Brian NULL Williams Fariss 713 615

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!