MHahn@seeandswim.com writes:
> I've been trying to figure out how to do the following:
> Select schedule.* from schedule join meetingday on schedule.id = meetingday.scheduleid where sessionnumber = 165
groupby schedule.* order by min(meetingday.date);
I think what you're after is
select * from schedule where sessionnumber = 165
order by (select min(meetingday.date) from meetingday where schedule.id = meetingday.scheduleid);
regards, tom lane