I have two queries I want to combine together to get the
JobCCNO, TotolEmpCount, TotalCompleteCount, IncompletedCount
For IncompletedCount should be TotolEmpCount-TotalCompleteCount
The data should be extract from tables OcchEmp,The data should be extract from table OcchEmp,tblCurrentWinTrainingLog
tblCurrentWinTrainingLog which contain the employees training info date , training, emplID
OcchEmp which contain the JobCCNO and EmplNO
I have those two query to get the total count , completed count. I do not know how to make that as one query. Thx.
select count(Emplno) as TotalEmpCount, jobccno from occhemp group by jobccno
select Count(distinct c.Emplno) as CompleteCount, c.QuizName,o.jobccno from tblCurrentWinTrainingLog c join OcchEmp o on c.Emplno=o.EMPLNO group by c.QuizName,o.JobCCNO
go
JobCCNO, TotolEmpCount, TotalCompleteCount, IncompletedCount
For IncompletedCount should be TotolEmpCount-TotalCompleteCount
The data should be extract from tables OcchEmp,The data should be extract from table OcchEmp,tblCurrentWinTrainingLog
tblCurrentWinTrainingLog which contain the employees training info date , training, emplID
OcchEmp which contain the JobCCNO and EmplNO
I have those two query to get the total count , completed count. I do not know how to make that as one query. Thx.
select count(Emplno) as TotalEmpCount, jobccno from occhemp group by jobccno
select Count(distinct c.Emplno) as CompleteCount, c.QuizName,o.jobccno from tblCurrentWinTrainingLog c join OcchEmp o on c.Emplno=o.EMPLNO group by c.QuizName,o.JobCCNO
go