Re: query

From: <amerar_at_iwc.net>
Date: Thu, 8 May 2008 05:33:56 -0700 (PDT)
Message-ID: <79695a3b-4d94-4033-a526-061fec75e6aa@d1g2000hsg.googlegroups.com>


On May 8, 6:32 am, gazzag <gar..._at_jamms.org> wrote:
> On 7 May, 18:50, "ame..._at_iwc.net" <ame..._at_iwc.net> wrote:
>
>
>
> > Thanks for the feedback Mark. Say I have this data:
>
> > Customer Id Action Date Status
> > ---------------------------------------
> > 12345678 12/01/2005 Active
> > 12345678 03/01/2005 Inactive
> > 12345678 01/01/2005 Active
> > 24568123 11/15/2005 Inactive
> > 33445566 03/01/2006 Active
> > 32548798 02/28/2005 Active
> > 77777733 02/15/2005 Inactive
> > 77777733 02/01/2005 Active
>
> > Now, basically I want to ignore row# 5 as it falls outside my range.
> > I also want to ignore row 4 as his status is inactive.
> > I want to include rows 6 as he is active, and row 1, as his MAX date
> > shows him active.
>
> > That is the key, that his MAX date still shows him active.
> > Row #7 will be ignored because his MAX date shows him as inactive....
>
> > Does that make more sense? And, we are on 10g R2....
>
> > Thanks again!
>
> > John
>
> As Mark said, post the relevant CREATE TABLE script, together with an
> INSERT script to populate the table and someone will be more inclined
> to help with your query.
>
> HTH
>
> -g

I do not understand why the CREATE table will help here. The three columns of interest are above. If you see the CREATE statement, how does that help with the query? Those are the only three columns which are related here......

Any why the INSERT also?

John Received on Thu May 08 2008 - 07:33:56 CDT

Original text of this message