Collin Peters <[EMAIL PROTECTED]> writes: > Is there a nice simple query I can run that will return me a list of > all the *latest* notes for all users (users can have many notes in the > table)?
You can use SELECT DISTINCT ON for that, if you don't mind using a Postgres-only feature. See the "weather reports" example in the SELECT reference page. If you want to stick to portable SQL, you can still do it, but it's pretty ugly and slow. Look in the list archives for previous discussions. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly