With postgres, I wrote this SQL Request :
SELECT projects.id
, projects.title
, comments.message as comment_message
FROM "projects"
RIGHT OUTER JOIN comments
ON comments.project_id = projects.id
GROUP BY projects.id, comments.message
And I have this kind of result :
id | title | comment_message
----+----------------+-----------------
6 | simple project | simple comment
6 | simple project | simple message
Is it possible to have only the first result? I just want to have one result by project.
Thanks!
You can write: