programming-examples/sql/SQLMovieDatabase/47. Write a query in SQL to find the highest-rated movie, and report its title, year, rating, and releasing country.sql

8 lines
285 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*47. Write a query in SQL to find the highest-rated movie, and report its title, year, rating, and releasing country. */
SELECT mov_title, mov_year, rev_stars, mov_rel_country
FROM movie
NATURAL JOIN rating
WHERE rev_stars = (
SELECT MAX(rev_stars)
FROM rating
);