日期:2014-05-18 浏览次数:20580 次
ALTER PROCEDURE [dbo].[UP_AdvCount] @UserId bigint AS BEGIN SELECT COUNT(distinct ADID) as total, SUM(CASE WHEN ADState_Id = 999 THEN 1 ELSE 0 END) AS showCount, SUM(CASE WHEN ADState_Id = 0 THEN 1 ELSE 0 END) AS noReviewCount, SUM(CASE WHEN ADState_Id = 3 THEN 1 ELSE 0 END) AS pauseCount From SK_ADVInfoList_VI WHERE DELETESTATE=0 AND AdUser_Id = @UserId END
ALTER PROCEDURE [dbo].[UP_AdvCount] @UserId bigint AS BEGIN SELECT COUNT(distinct ADID) as total, COUNT(distinct CASE WHEN ADState_Id = 999 THEN 平台 ELSE NULL END) AS showCount, COUNT(distinct CASE WHEN ADState_Id = 0 THEN 平台 ELSE NULL END) AS noReviewCount, COUNT(distinct CASE WHEN ADState_Id = 3 THEN 平台 ELSE NULL END) AS pauseCount From SK_ADVInfoList_VI WHERE DELETESTATE=0 AND AdUser_Id = @UserId END