Hello every body.I have a database with two table Product and DetailBillTable Product IDPro NamePro Descrypt ImageProTable DetailBillIDBill IDPro Count PriceI have a procedureALTER proc [dbo].[sp_Product_2]as select top(9) IDPro,count(IDPro) as SumofPro from DetailBillgroup by IDProorder by SumofPro desc
I must select * from Product with IDPro bellow , but i can`t .Can you help me ? I try ALTER proc [dbo].[sp_Product_2]as Select * from Product where IDPro in (select top(9) IDPro,count(IDPro) as SumofPro from DetailBillgroup by IDProorder by SumofPro desc)