SQL Help

From: anil <anil(at)server(dot)awcoldstream(dot)com>
To: PostgreSQL <pgsql-general(at)postgreSQL(dot)org>
Subject: SQL Help
Date: 1998-10-07 02:40:08
Message-ID: 361AD488.E4FE6C78@awcoldstream.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello!

I have a tabe :
addates : (adid int 4,rundate date,posted boolean,dateid int4 unique
create no. from sequence datesequence)

table is like this
adid
rundate posted dateid
1031 05-17-1998
t 1856
1031 06-20-1998
t 2032
1031 06-23-1998
t 2056
1031 06-30-1998
f 2077
1055 05-21-1986
t 456
1055 01-01-1998
t 987
1055 06-30-1998
f 2089
I do have lots of entries like this - 30,000 rows

what I want to find is -adid of records that has posted=f for one
pertticuler day (ex. 06-30-1998) and last run date (maximum date value
which is mark as true for each and every record of adid field)

should be like this adid rundate lastposted
date datedid
1031 06-30-1998
06-23-1998 2077
1055 06-30-1998
01-01-1998 987
How do I do this??

Thank you very much in advance for any thoughts.

Cheers

Anil

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 1998-10-07 02:41:21 Re: [HACKERS] RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Previous Message chris yambo 1998-10-06 19:23:31 Re: [GENERAL] Regex problems