我是一个非常基础的用户,所以请放轻松。这是我的问题,我正在尝试计算同一列的数量,但使用不同的子句。我想将来自同一个数据库/表的 2 个查询合并为一个。我确定这很简单...
1
Select count(inquiry_id) as 'Emails Tickets'
, owner_rep
From sv_inquiry
Where logged_dt > '5/6/2013 0:00:00'
and owner_grp in ('it service desk','corporate support')
and it_source = 'email'
group by owner_rep
2
Select count(inquiry_id) as 'Tele Tickets'
, owner_rep
From sv_inquiry
Where logged_dt > '5/6/2013 0:00:00'
and owner_grp in ('it service desk','corporate support')
and it_source = 'telephone'
Group by owner_rep
任何帮助,将不胜感激。