SQL Query

From: Ashish Karalkar <ashish_postgre(at)yahoo(dot)co(dot)in>
To: pgsql-novice(at)postgresql(dot)org, ashish(dot)karalkar(at)netcore(dot)co(dot)in
Subject: SQL Query
Date: 2007-12-13 09:47:36
Message-ID: 591590.76564.qm@web94315.mail.in2.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

Hello List member,
I have a table which ha sfollowing structure

my_table:
(
output_id serial priimary key,
parent_id int,
output_date timesatmp
)

parent_table:

(parent_id int,
parent desc
)

the my_table contains data for previous as well as future output dates.
for single parent there may be multiple rows.

I want to retrieve all the output_id which are having latest output_date but less than now() (no future output_dates) group by parent_id

Thanks in advance

With Regards
Ashish...


---------------------------------
Chat on a cool, new interface. No download required. Click here.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ashish Karalkar 2007-12-13 10:00:56 SQL Query
Previous Message Gregory Stark 2007-12-13 09:45:47 Re: Slow PITR restore

Browse pgsql-novice by date

  From Date Subject
Next Message johnf 2007-12-13 15:12:26 Re: remote user
Previous Message A. Kretschmer 2007-12-13 06:04:54 Re: remote user