Re: query
Date: Thu, 8 May 2008 04:32:06 -0700 (PDT)
Message-ID: <57983bae-ee9e-4807-a57b-c7da5e107948@l64g2000hse.googlegroups.com>
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 Received on Thu May 08 2008 - 06:32:06 CDT