SELECT COUNT(CASE WHEN (ID IS NOT NULL AND DISP IN ('ANS','ABAN')) THEN 1 ELSE NULL END)off,
COUNT(CASE WHEN (ID IS NOT NULL AND DISP IN ('ANS')) THEN 1 ELSE NULL END) HAN,
COUNT(CASE WHEN (ID IS NOT NULL AND DISP IN ('ABAN')) THEN 1 ELSE NULL END)ABAN
FROM table1
WHERE CALLSTARTTIME >= :CALLSTART and CALLSTARTTIME <= :CALLEND
I need a report which shows data for each and every one hour for day so that if i need the report to run for every one hr.
Suppose i want to run the report from morning 9am to 9pm
morning 9am to 10am data i need to get at 10:15
morning 10am to 11am data i need to get at 11:15
..
Please help me out with the query and the report
Thanks,
reacha
COUNT(CASE WHEN (ID IS NOT NULL AND DISP IN ('ANS')) THEN 1 ELSE NULL END) HAN,
COUNT(CASE WHEN (ID IS NOT NULL AND DISP IN ('ABAN')) THEN 1 ELSE NULL END)ABAN
FROM table1
WHERE CALLSTARTTIME >= :CALLSTART and CALLSTARTTIME <= :CALLEND
I need a report which shows data for each and every one hour for day so that if i need the report to run for every one hr.
Suppose i want to run the report from morning 9am to 9pm
morning 9am to 10am data i need to get at 10:15
morning 10am to 11am data i need to get at 11:15
..
Please help me out with the query and the report
Thanks,
reacha