Here is my query:
select fldUserId, count(*) AS TOTAL
from tblWorkHistory
where fldStatus = '1'
group by fldUserId
union
select fldEmpID, count(*) AS TOTAL
from tblQAHistory
where fldStatus = '1'
group by fldEmpID
Output:
fldUserId TOTAL
16070004 34
19100015 1
19100015 7
191014571 3
I want to combine both rows with '19100015' into one row.