Hardik Bhavsar

Hardik Bhavsar

  • NA
  • 164
  • 56.1k

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)