Bustaz Kool
me but I'll post anyway...Here are a couple ways: (if the dateRanges are the same for both status')SELECT TaskDates.Status ,Count(Tasks.TaskID) taskCountFROM Tasks JOIN TaskDates ON Tasks.TaskID=TaskDates.TaskIDWHERE TaskDates.DateValue > '01/01/2005'AND TaskDates.DateValue <'03/31/2005' AND TaskDates.Status IN ('Complete', 'Scheduled')Group by TaskDates.Statusselect comp = sum(comp) ,schd = sum(schd)From ( SELECT comp = case when status = 'Complete' then 1 else 0 end ,schd = case when status = 'Scheduled' then 1 else 0 end FROM Tasks JOIN TaskDates ON Tasks.TaskID=TaskDates.TaskID WHERE TaskDates.DateValue > '01/01/2005' AND TaskDates.DateValue <'03/31/2005' AND TaskDates.Status IN ('Complete', 'Scheduled') ) aBe One with the OptimizerTG