How can I combine Join these two tables?
Table 1
SELECT job_category.JobCategoryId, job_category.JobCategoryName, count(job_position.JobCategoryId)
AS AvailableCategories
FROM job_position
Right Outer JOIN job_category ON job_position.JobCategoryId = job_category.JobCategoryId
GROUP BY job_category.JobCategoryId, job_category.JobCategoryName
Table 2
(SELECT job_category.JobCategoryId, job_category.JobCategoryName, count(job_position.ContactId) AS AllocatedJobs
FROM job_position
Right Outer JOIN job_category ON job_position.JobCategoryId = job_category.JobCategoryId
WHERE job_position.ContactId > 0
GROUP BY job_category.JobCategoryId, job_category.JobCategoryName)
Thanks