Posts by Francisco Júnior • 11 points
1 post
-
1
votes3
answers121
viewsA: Select the first result of each conversation
I did it the way I thought was right, I tested it here and it worked perfectly. SELECT t1.* FROM (SELECT * FROM messages) t1 INNER JOIN messages t2 ON (t2.id = t1.from_id AND t2.from_id = t1.id)…