SELECT TOP(100) M.title, count(WH.movie_id) FROM Movie AS M inner join WatchHistory AS WH ON M.movie_id = WH.movie_id GROUP BY WH.movie_id, M.title, count(WH.movie_id) ORDER BY count(WH.movie_id) ASC;
BlockquoteColumn 'Movie.title' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
My assignment is to do the following query:
Show 100 films that have gone so far were looked at. This also means 0 times [film title, number of times viewed]. Make a View for this information requirement.
It gives the error above