close
SELECT A.name, COUNT(B.call_id)AS'outgoing call count'FROM
EmployeeTable A
LEFTJOIN(SELECT call_from_name, call_id FROM CallTable
WHERE call_type LIKE'outgoing'AND voice_mail ='0'AND/* other CallTable filters */) B
ON A.name = B.call_from_name
WHERE/* only EmployeeTable A filters */GROUPBY A.name
全站熱搜
留言列表