Postgresql – Return paginated list of rows from table where only the latest row is returned filtered by one column and deduplicated on another
Imagine a table of user messages that looks like this: | ID | MESSAGE | RECIPIENT_ID | ULTIMATE_PARENT_ID | SENT_AT | | 1 | Blah. | 10 | 1 | 2024-09-10T10:10:00 | | 2 | Blah2 | 10 | 2…