Which query should you use?

You have a table named Sales.
You need to return sales data ordered by customer name. For each customer, the most recent sale must be listed first.
Which query should you use?

You have a table named Sales.
You need to return sales data ordered by customer name. For each customer, the most recent sale must be listed first.
Which query should you use?

A.
SELECT CustomerName,
SalesDate
FROM Sales
ORDER BY CustomerName,
SalesDate;

B.
SELECT CustomerName,
SalesDate
FROM Sales
ORDER BY SalesDate DESC,
CustomerName;

C.
SELECT CustomerName,
SalesDate
FROM Sales
ORDER BY CustomerName,
SalesDate DESC;

D.
SELECT CustomerName,
SalesDate
FROM Sales
ORDER BY CustomerName DESC;



Leave a Reply 0

Your email address will not be published. Required fields are marked *