Re: [GENERAL] Joining one-to-one and one-to-many tables

2010-03-12 Thread Jeff Ross
on to figure this out. Jeff -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Jeff Ross Sent: Thursday, March 11, 2010 11:37 AM To: PostgreSQL Subject: [GENERAL] Joining one-to-one and one-to-many tables I'm stumped

Re: [GENERAL] Joining one-to-one and one-to-many tables

2010-03-11 Thread Garrett Murphy
date_id JOIN people ON trs_tr_date_pp_id = pp_id WHERE tr_status='Pending' -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Jeff Ross Sent: Thursday, March 11, 2010 11:37 AM To: PostgreSQL Subject: [GEN

[GENERAL] Joining one-to-one and one-to-many tables

2010-03-11 Thread Jeff Ross
I'm stumped about the best was to retrieve the most recent entry in a one-to-many type of table and combine it with a more standard query that joins one-to-one. I have defined these: jr...@wykids localhost# \d trainer_dates Table "public.trainer_dates"