Hi all, I'm trying to make a query that, given N and a date, gives me the interval of N hours with the max(sum(...)). In others words, given the following table:
With N = 3 and date = '2010-06-16' for example ... I'd like that the "query" gives me as response: the interval from 3AM and 5AM. Any solutions and/or hints?