I know my title is not very informative but let me explain what I'm trying to do. Here's the SQL query I'm running on my Oracle server:
select
median(to_number(TRU.TS_OBJECT.XE2ETIME)) as E2E,
median(to_number(TRU.TS_OBJECT.XPROCESSTIME)) as Serveur,
count(to_number(TRU.TS_OBJECT.XE2ETIME)) as hits,
TRU.TS_OBJECT.CSURISTEM
from
tru.ts_object
where
(TRU.TS_OBJECT.XSTARTTIME >= to_date('2014/01/08 05:30','yyyy/mm/dd HH24:MI') and TRU.TS_OBJECT.XSTARTTIME < to_date('2014/01/08 21:00','yyyy/mm/dd HH24:MI'))
and TRU.TS_OBJECT.CSMETHOD = 'POST'
and TRU.TS_OBJECT.SCSTATUS = '200'
Group by
TRU.TS_OBJECT.CSURISTEM
This query let me find the median for some performance metrics of our web service we exposed to our client. So this give me, for a specific period of time between 5h30 AM to 21h00 PM, the median for this day (2014/01/08).
What a trying to do now is the produced the same output but for a larger period of time, let say 2014/01/01 to 2014/01/29, but always for the data between 5h30 and 21h00 on each day. Right now I'm doing it manually by changing the date range but there's should be a "smarter" way to do this with a select of some sort!?!?!