The query is:
select datetime,
sum(orig_count) "Orig Total",
sum(term_count) "Term Total",
sum(orig_count)+ sum(term_count) "SMS Tot",
round( ( sum(orig_count)+sum(term_count) ) / 3600, 2) avg
from schema.table
where datetime between trunc(sysdate)-1 and trunc(sysdate)-1/24
and caption not in ('mar2','mar1','QO11','QO21','QO31')
group by datetime