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.

9 lines
376 B
SQL

/*49. Write a query in SQL to generate a report which shows the year when most of the Mystery movies produces, and number
of movies and their average rating. */
SELECT mov_year,gen_title,count(gen_title), avg(rev_stars)
FROM movie
NATURAL JOIN movie_genres
NATURAL JOIN genres
NATURAL JOIN rating
WHERE gen_title='Mystery'
GROUP BY mov_year,gen_title ;