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.