I am getting from the below query
SELECT co.mobility_theme, COUNT(DISTINCT ca.user_id) AS n
FROM courses_apply AS ca LEFT JOIN dy41s_courses AS co ON ca.course_id = co.id
WHERE ca.submission IS NULL AND ca.`call` LIKE '1b'
GROUP BY co.mobility_theme
ORDER BY co.mobility_theme ASC
The below result total (133)
mobility_theme n
1 =>70
4 =>18
5 =>45
What I want to do is: for each mobility theme (1,2 and 5), I have repeated users, so the total unique user_id should be (130), I cannot manage to get unique user_id group by (mobility theme), any help?