or, from the "stupid tricks" category: SELECT n.user_id, max(lpad(extract(epoch from n.modified_date),12,'0') || ' ' || note)FROM notes nGROUP by n.user_id i am not *really* suggesting this!
pgsql-sql by date:
Соглашаюсь с условиями обработки персональных данных