I have a query like:
SELECT a.EmployeeId,
count(a.JobStatusId) cTotOut
FROM ActivityRecord a
where a.jobstatusid <> 5
GROUP BY a.EmployeeId
SELECT a.EmployeeId,
count(a.JobStatusId) cTotHis
FROM ActivityRecord a
where a.jobstatusid = 5
GROUP BY a.EmployeeId
The result on my PC is like:
I want the queries above become a single query and become something like:
---------------------------------------
EmployeeId cTotOut cTotHis
---------------------------------------
A 7 5
B 5 7
C 4 8
I have a question:
Is it possible with two different condition into a single query?
Please advice.
Thank you.
