Write an SQL statement to list the FirstName, LastName, Phone, ProductNumber, an
ID: 3813385 • Letter: W
Question
Write an SQL statement to list the FirstName, LastName, Phone, ProductNumber, and Description names for customers (list each combination of name and product only once) who have purchased a video product. Sort the results by LastName in descending order, then by FirstName in descending order, and then by ProductNumber in descending order. (Hint: Video products have a ProductNumber that starts with VK)
MySQL Workbench t View Query Database Server Tools Scripting Help File SQL, File 8 SQL Additions Navigator SCHEMAS Jump to t wrap Cell Contenta lt Grid Filter Rows Filter objects CustomerID ContactNumber Contactoate contacmype SeminarID Automatic context help is disabled. Us Rezuh 3-7 2013-10-12 the toolbar to manually get help for the current caret position or to toggle 2013-10-15 asswork3 2 utomatic help. hsd 2013-10-15 Form etter Seminar hsd2 2013-10-12 seminar hsd3 EmailseminarMessage Tables 2013-10-15 contact 2013-10-15 Formletterseminar customer 2013-10-12 2013-10-15 EmaiseminarMessage E ne item p oduct 2013-10-15 Form etter Seminar 2014-02-20 WebAccountCreation E seminar customer views 2014-02-20 EmalAccountMessage stored Procedures 2013-10-12 Seminar nctions EmailseminarMessage 2013-10-15 akila Apply Context Help Snippets contact 1 X toy db world Action output Information Duration/Fetch a 4 2 5.51 SELECT DISTINCT FirstName. Lastname. Phone FROM Customers NATURAL JOIN Title- Ermor Code: 1064. You have an emorin your SQL syntax, check the manual that comesponds 0.016 sec Table: 5 21:2248 CREATE TABLE CUSTOMER(CustomerIDIntNOTNULL auto increment. LastNameChar2... Emor Code: 1050. Table customer already exists 0.047 sec 6 21.2249 CREATE TABLECUSTOMER(CustomerlDintNOT NULL auto increment. LastNameChar2... Emor Code: 1050. Table customer already exsts 0.000 sec 7 21:23 20 SELECTDISTINCT First Name. Lastname. Phone FROM Customers JOIN Trke- Kitchen on Emor Code: 1064. You have an emorin your SQLsyntax: check the manual that comesponds 0.000 sec ContactDate ContactType 8 21:23.20 SELECT DISTINCT FirstName. Lastname. Phone FROM Customers JOIN Ttle "Kitchen on Emor Code: 1064. You have an emorin your SQL syntax check the manual that come 0.000 sec sponds Q 9 21:23 28 SELECT ROM hsd3 contact LIMITO. 1000 42 now netumed 0.015 sec 0.000 sec Object Info Query CompletedExplanation / Answer
SELECT FirstName, LastName, Phone, ProductNumber, and Description FROM Customers WHERE purchase = 'video product' GROUP BY FirstName AND Product ORDER BY LastName DESC, FirstName DESC, ProductNumber DESC;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.