Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.
Here's what I have so far as an SQL Query: SELECT CUSTOMERS.CustID, CUSTOMERS.Cname, COUNT(DISTINCT ORDERS.OrderID) AS 'Nbr of Orders' FROM CUSTOMERS...
Here's what I have so far as an SQL Query:
SELECTCUSTOMERS.CustID,
CUSTOMERS.Cname,
COUNT(DISTINCT ORDERS.OrderID) AS 'Nbr of Orders'
FROMCUSTOMERS LEFT JOIN ORDERS ON CUSTOMERS.CustID = ORDERS.CustID
GROUP BYCUSTOMERS.CustID, CUSTOMERS.Cname
ORDER BY'Nbr of Orders' DESC
It gives me a list of 'Nbr of Orders' in decending order, but I want only the top ranking item to appear. How do I do that? I need this as soon as possible. It is due soon.