Question: 2. Write a SQL statement to list LastName, FirstName, and Phone of the customers who made the purchase with SaleIDs 1, 2, and 3 .
2. Write a SQL statement to list LastName, FirstName, and Phone of the customers who made the purchase with SaleIDs 1, 2, and 3 . Use a join with JOIN ON syntax. 3. Write a SQL statement to show the average item cost for each vendor. The output should list vendor company names, vendor phone numbers, and the average item cost. 4. Write a SQL statement to show the sum of SubTotal for each customer. The output should list CustomerID, LastName, FirstName, Phone, and the sum of SubTotals for each customer. Sort the results by Last Name, in descending order. 5. Write a SQL statement to show all items and (if any) the customers who have purchased them. The output from this statement should include all items, including those that have not been purchased by a customer. The SQL statement output should list ItemID, ItemDescription, CustomerID. LastName. FirstName. \begin{tabular}{|l|} \hline VENDOR \\ Vensods \\ Cempantame \\ Conactiartiant \\ Contactinthane \\ Assins \\ CTy \\ State \\ ap \\ Peont \\ Fax \\ Emal \\ \hline \end{tabular} EMPLOYEE 7 Empiownd Lartsame Frntsiame Phern Enal CUSTOMER 5 Cuatemuld tamkare Firstiame Addreul Ch Stant Drone tmail
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
