Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Daily max(value) query for time period

ZewbieDec 18 2012 — edited Dec 19 2012
I am looking to get the maximum value for every 24 hour period for a month. So for example my date range can be defined by...

select to_date('&date','mm yyyy')-1 + level as DateRange
from dual
connect by level <= '&days'

...where I can provide the first date of the month and number of days in the month or a lesser value if less time is required. So, the results of the above query plus 24 for the range. I thought a some googling would provide me what I needed, but my search came up empty.

I was hoping to do something like this...
select utctime, max(value) from table where utctime between....

Any guidance would be much appreciated!
Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2013
Added on Dec 18 2012
4 comments
2,124 views