| From: | Ashish Karalkar <ashish_postgre(at)yahoo(dot)co(dot)in> |
|---|---|
| To: | pggeneral <pgsql-general(at)postgresql(dot)org> |
| Subject: | SQL Query |
| Date: | 2007-12-13 10:00:56 |
| Message-ID: | 401674.75312.qm@web94303.mail.in2.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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...
---------------------------------
Forgot the famous last words? Access your message archive online. Click here.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Simon Riggs | 2007-12-13 10:21:48 | Re: [GENERAL] Slow PITR restore |
| Previous Message | Ashish Karalkar | 2007-12-13 09:47:36 | SQL Query |