<br /><p><font size="2">Hi,<br /><br /> What about something like that ?<br /><br /> select adate, sum(openedCount) as
openedCount,sum(closedCount) as closedCount<br /> from<br /> (<br /> select sum(case when status ='Closed' then
stop_dateelse start_date end) as adate,<br /> sum(case when status ='Closed' then 1 else 0 end) as
closedCount<br/> sum(case when status ='New' then 1 else 0 end) as openedCount<br /> from Yourtable<br />
wherestatus in ('Closed','New')<br /> )x<br /> group by adate<br /> order by adate<br /><br /> HTH,<br /><br /> Marc<br
/></font>