摘要:
1, Select 50 unit unique records select distinct top 50 SalesId from salesline2, Selecttotal amount> 1500 recordsselect salesid,sum(amount) from salesline group by salesid having sum(amount)>15003, Define temporary tablecreate table #SalesCustom (UserName varchar(30), CustName varchar(30), Emp 阅读全文