Hi everyone I'm facing a challenge, so I'm joining two tables, my course table & my videos table but the query below gives me duplicates on course id of which l want distinct rows eg so that l can only pull one video posted per course as my preview video.
SELECT DISTINCT * FROM `course` a
LEFT JOIN `media_center` b
ON a.name = b.course
ORDER BY b.created_at DESC
the below picture is my result but if you check the first id column that's for course there is duplicate id eg 4, 4 then 3, l just want to have distinct especially on that column