Hardik Bhavsar

Hardik Bhavsar

  • 1.9k
  • 162
  • 49.7k

how to use subquery?

Nov 25 2013 1:43 AM
How to use subquery when return a multiple values in main query?

Example :

select  ProductID from purchaseorderitemdetail where productid in
(select top 5 ProductID,SUM(Amount) from PurchaseOrderItemDetail group by ProductID order by SUM(amount) desc)


Thanking You
Hardik Bhavsar


Answers (2)