SQL Language (MOSC)

MOSC Banner

how to summarize data per 15 minutes

edited Jan 21, 2014 3:03PM in SQL Language (MOSC) 6 commentsAnswered
Hi folks.....

I have the following query which gives me the results of jobs per hour with the status

Select status,  count(*),   to_char(created, 'hh24') || ':00 - ' || to_char(created + 1/24, 'hh24')|| ':00' "Time"
from <table_name>
where trunc(created) = trunc(sysdate)
  and 1 * to_char(created, 'hh24') between 7 and 19
group by to_char(created, 'hh24'), to_char(created + 1/24, 'hh24') ,  status
order by "Time" asc, status
/the output of this query is like thisStatus Number Time
S       28          07:00 - 08:00
S         2          07:00 - 08:00
F         5          08:00 - 09:00
S      181          08:00 - 09:00
S       40           09:00 - 10:00
F       1            10:00 - 11:00
etc etc

I want to elaborate this so I get this as a result

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center