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: Find the first record, for every day

Re: Find the first record, for every day

From: Thomas Kellerer <WVIJEVPANEHT_at_spammotel.com>
Date: Wed, 21 Dec 2005 11:08:16 +0100
Message-ID: <40snsnF1bn8isU1@individual.net>


On 21.12.2005 10:48 ohahaahr_at_hotmail.com wrote:
> Hi !
>
> I have a tricky problem, and i can't solve it.
>
> I have the following table T1, with the following fields and records:
>
> Date_ Status
> ---------- -------
> 2005-12-01 2
> 2005-12-01 1
> 2005-12-17 1
> 2005-12-18 2
> 2005-12-18 10
>
> I want to generate on output, that gives me the "first" record every
> day. The output should look like this:
>
>
> Date_ Status
> ---------- -------
> 2005-12-01 2
> 2005-12-17 1
> 2005-12-18 2
>
>
> This appears to be a very simple problem, but i can't find the
> solution. Can anybody give me a hint ? (I have tried with rownum, but
> that didn't work).
>

The question is: what is the difference between the date 2005-12-01 with Status 2 and the date for 2005-12-01 with the status 1. How do you distinguish between the two? Which one is the "first", you don't seem to have an additional sorting criteria that could be used to find the "first" of a given day.

Thomas

-- 
It's not a RootKit - it's a Sony
Received on Wed Dec 21 2005 - 04:08:16 CST

Original text of this message

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