Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.
SELECT a.EmployerName, a.EmployerID, b.ActiveEmployees, c.PaidOutEmployees FROM Employers a LEFT JOIN (SELECT Count(Employees.EmployeeStatus) AS ActiveEmployees, Employees.EmployerID FROM Employees WHERE Employees.EmployeeStatus='ACTIVE' GROUP BY Employees.EmployerID, Employees.EmployeeStatus) b ON a.EmployerID=b.EmployerID LEFT JOIN (SELECT Count(Employees.PlanStatus) AS PaidOutEmployees, Employees.EmployerID FROM Employees WHERE Employees.PlanStatus='PAID OUT' GROUP BY Employees.EmployerID, Employees.PlanStatus) c ON b.EmployerID = c.EmployerID;
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.