The syntax would be like shown below.SELECT COUNT(DISTINCT JOB.JobID) AS JobsRun,
COUNT (DISTINCT CASE WHEN Job.SaleIsSold = 'True' THEN JOB.JobId END) as JobsSold
FROM JOB
WHERE JOB.PrimaryEmp = '294'
AND JOB.SchedDate BETWEEN '12/27/12' AND '1/16/13'Couple of things to note:
1. I added a distinct clause in the second count as well - not sure if your business logic calls for that or not.
2. Is SaleIsSold a char or varchar type of column? If it is, you are ok, but if it is a bit column, instead of comparing to 'True' you should compare to 1.