标签:tty model Nid esc top style code LLC lse
select top(10) FModelCode,FProductTypeName,FBrandName,FOrganizationName,KOrganizationID,count(0) FALLCount, sum(case when FStatus >1 then 1 else 0 end) SaleCount, sum(case when FStatus >0 then 1 else 0 end) SendCount from VProduct group by FModelCode,FProductTypeName,FBrandName,FOrganizationName,KOrganizationID order BY SaleCount DESC
sum(如果符合条件1否则0) 这样就可以按照条件统计个数了
标签:tty model Nid esc top style code LLC lse
原文地址:https://www.cnblogs.com/linyijia/p/10274162.html