SQL 分组求行数

分组求行数

SELECT  DateTime,AgentName  ,Count(SessionId)as DayWorkSum ,1 as DayWork  FROM  cti_record WHERE Date ='2012-03-04' and AgentName in (1006,1013 )
group by AgentName

 

posted @ 2012-04-16 16:59  海乐学习  阅读(522)  评论(0编辑  收藏  举报