I need to find out customers having more than one order for the same product
Xyz table
---------
Customer_Id
Order_ID
Prodcut_ID
Abc
Mnr
I can get information like
Select customer_Id,Product_Id, Count(Customer_ID) Cnt from Xyz
Group By customer_Id,Product_Id having Count(Customer_ID) >= 2
Order By Customer_Id
But I want to include rest of the columns and I don’t want to use any temp tables either.