|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, June 24, 2009 12:13 AM
Points: 6,
Visits: 30
|
|
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.
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Thursday, May 02, 2013 5:38 AM
Points: 870,
Visits: 858
|
|
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.
Karl source control for SQL Server
|
|
|
|