Hey, I have 2 tables in PostgreSql:
1 - documents: id, title 2 - updates: id, document_id, date
and some data:
documents:
This should also work
SELECT * FROM documents, updates WHERE documents.id=1 AND updates.document_id=1 AND updates.date = (SELECT MAX (date) From updates)