I want to join two tables using a join
SELECT * FROM posts
LEFT JOIN voted ON posts.post_id = voted.id
Which produces this:
How would I create query using:
ORDER BY date_posted DESC FETCH FIRST 5 ROW ONLY
on the Posts Table to return this result
Edit 1: duplicate post_id
How would I make it so that the uuid on the user_id column is only 82411850-
Edit 2: Final query thanks to Mr.Linoff
SELECT p.post_id, p.date_posted, p.posted_by,
v.user_id, v.votes
FROM posts p LEFT JOIN
voted v
ON p.post_id = v.id
AND v.user_id = '82411580...'
ORDER BY p.date_posted DESC
FETCH FIRST 5 ROW ONLY ;


