Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL count by time intervals

Re: SQL count by time intervals

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Fri, 11 Nov 2005 08:54:05 +0100
Message-ID: <43744e1c$0$9940$626a14ce@news.free.fr>

"Schroeder" <schroeder915_at_yahoo.com> a écrit dans le message de news: 1131668265.723358.61510_at_g43g2000cwa.googlegroups.com...
| Okay Michel. I'm not real swift, but I think I get it. And I just have
| to say, WOW!
|
| I was getting hung up thinking about how subtracting 7 hours would turn
| the clock back, and then I didn't understand how that would return a
| correct shift, i.e., I was thinking that a call at 1:00 AM (3rd shift)
| after subtracting 7 hours, the result would be 2nd shift instead.
|
| Now I see that isn't at all what's happening.
|
| You're taking the day as an entity with 24 hours, where midnight is 0.
| So, if the first shift starts at 7, you have to set it at the start of
| the day (i.e., the start of day by my work clock has been shifted
| forward 7 hours from midnight, 0, so you're just resetting my start of
| day to zero).
|
| If, for example, the first shift started at 5 AM, I'd want to reset it
| to a zero value corresponding to the actual start of day at midnight by
| subtracting 5.
|
| Then, the division by 8 splits up the solution set into 3 equal parts
| of 24 hours.
|
| Crystal clear (I think). See - this is what I love about forums like
| this where people approach a problem in a completely unique way than I
| do.
|
| Thanks!
|

You got it!

Regards
Michel Cadot Received on Fri Nov 11 2005 - 01:54:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US