I have a table called Conversation and another table called ConversationLog
The connection between them is ConversationLog.conversation_id = Conversation.id (using FK).
ConversationLog has different types (e.g. ‘incoming’, ‘outgoing’).
What I want to do is show a table of all Conversation and one of the columns should be the last ConversationLog record.message field where it’s type is ‘outgoing’.
I also want to be able to sort and filter this ‘message’ value.