You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
405 B
SQL

/*32. Write a query in SQL to find the movie title, and the highest number of stars that movie received and arranged the
result according to the group of a movie and the movie title appear alphabetically in ascending order. */
SELECT mov_title, MAX(rev_stars)
FROM movie, rating
WHERE movie.mov_id=rating.mov_id
AND rating.rev_stars IS NOT NULL
GROUP BY mov_title
ORDER BY mov_title;