sreekirt-1108866
SSC Journeyman
Points: 80
More actions
June 11, 2009 at 4:36 am
#135092
I have 2 tables with customer id in one coulmn and orderid in another table.
I need to find out the customers having maximum number of unique orders.
finf customer 1 has 4 different orders i need to display the count as 4 against customer 1.
SQLZ
SSChampion
Points: 12872
June 11, 2009 at 4:59 am
#1007893
This sounds a bit like a school work type question so without wanting to give too much of an answer I'd suggest you look at the GROUP BY clause - that should help you find the answer.
Karlsource control for SQL Server
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply