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…

Category: Engineering

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.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Pay Someone To Write Essay