칼럼마다 다른 조건주고 날짜별로 정리


칼럼마다 다른 조건주고 날짜별로 정리

select count(case when logpage='/index.asp' ) and a.logip not like '%111%' then 1 end ) as Main유입수 , count(distinct (case when a.logpage='/index.asp' and a.logip not like '%2.%' then a.logip end)) as IP중복제거, count(distinct b.memberid) as 등록수, count(distinct d.memberid) as 등록수, x.DATE1 from ( SELECT CONVERT(VARCHAR(10), DATEADD(DAY,0,'2016-08-25') +(T1.Number+T2.number), 120) AS DATE1 FROM Master.dbo.spt_Values T1, Master.dbo.spt_Values T2 WHERE T1.Type = 'P' AND T1.Number < 1 AND T2.Type = 'P' a...



원문링크 : 칼럼마다 다른 조건주고 날짜별로 정리