(Select count(*) from 表名 where datediff(day,cdtrecordtime,getdate())=0) as '今天',
(Select count(*) from 表名 where datediff(week,cdtrecordtime,getdate())=0) as '本周',
(Select count(*) from 表名 where datediff(Month,cdtrecordtime,getdate())=0) as '本月',
(Select count(*) from 表名 where datediff(quarter,cdtrecordtime,getdate())=0) as '本季度',
(Select count(*) from 表名 where datediff(Month,cdtrecordtime,getdate())<=6) as '半年',
(Select count(*) from 表名 where datediff(year,cdtrecordtime,getdate())=0) as '全年
待验证的
(Select count(*) from 表名 where datediff(week,cdtrecordtime,getdate())=0) as '本周',
(Select count(*) from 表名 where datediff(Month,cdtrecordtime,getdate())=0) as '本月',
(Select count(*) from 表名 where datediff(quarter,cdtrecordtime,getdate())=0) as '本季度',
(Select count(*) from 表名 where datediff(Month,cdtrecordtime,getdate())<=6) as '半年',
(Select count(*) from 表名 where datediff(year,cdtrecordtime,getdate())=0) as '全年
待验证的