I have 2 tables (movies and watch).
I want to know which movies is being watched by how many people.
I did this:
SELECT movieID, count(persID) FROM watch GROUP BY persID;
Which gives me basically what I want. The only problem is that movies that aren't being watched by anyone won't show up in my result table as 0 viewers but they are just left out.
I want to achieve this in two different ways. Using UNION and the other way using a subquery.
