Someone asked about creating a report that includes defects by date range. I hope the code below helps:

<font color="blue"> </font>
BUG.BG_USER_03 AS 'Application' /*Defect.Application*/,
COUNT(*) as 'Defect Count by Application'
from BUG /*Defect*/
where BUG.BG_USER_02 /*Defect.Defect Status*/ in ('Closed') /*Defect.Defect */
and BUG.BG_USER_11 ='your product here'/*Defect.Product*/
and BUG.BG_DETECTION_DATE &gt; '08/20/2007'/*Defect.Detected on Date*/
and BUG.BG_DETECTION_DATE &lt; '08/20/2008'
group by BUG.BG_USER_03 /*Defect.Application*/, BUG.BG_USER_02 /*Defect.Defect Status*/
/*with rollup */
with rollup
order by BUG.BG_USER_03, BUG.BG_USER_02 /*Defect.Defect Status*/ /*Defect.Application*/