Postgresql – List each message from table A with it's earliest response in table B, chronologically
I have three tables: conversations, user_messages and system_messages. Their basic structure (irrelevant columns removed for brevity) is: create table conversations(id int generated by default as identity primary key); create table user_messages( id int generated by default as identity primary key…