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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Duration Question

Re: Duration Question

From: DA Morgan <damorgan_at_psoug.org>
Date: Sat, 02 Dec 2006 09:44:23 -0800
Message-ID: <1165081462.114392@bubbleator.drizzle.com>


dave.howland_at_gmail.com wrote:

> Okay, I guess I could have been more specific - how would one go about
> doing it?
> It seems like it would be one of those SQL tricks.
> Michel Cadot wrote:

>> <dave.howland_at_gmail.com> a écrit dans le message de news: 1165033982.461507.272230_at_80g2000cwy.googlegroups.com...
>> | Hello everyone:
>> |
>> | I have a db table that contains three pieces of information ( let's say
>> | I was tracking car trips), a start time(date), an end time(date) and a
>> | duration(int) What I want to know (two things) (a) in every hour of
>> | every day, is there a way that I could tell the maximum number of
>> | concurrent cars on the road? (b) what is the total number of cars on
>> | the road in each hour?
>> |
>> | Can this be done is SQL?
>> |
>>
>> Yes.
>>
>> Regards
>> Michel Cadot

There are many solutions and this question looks and feels like homework or a class final.

One way would be to look at each time at which you wish to check and do a count using BETWEEN.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sat Dec 02 2006 - 11:44:23 CST

Original text of this message

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