From the following tables, write a SQL query to find those movies, which reviewed by a reviewer and got a rating. Sort the result-set in ascending order by reviewer name, movie title, review Stars. Return reviewer name, movie title, review Stars
- برمجة سي كيو ال sql
- 2021-09-03
- mhanasmh00489829403
الأجوبة
SELECT rev_name, mov_title, rev_stars
FROM reviewer, rating, movie
WHERE reviewer.rev_id=rating.rev_id
AND movie.mov_id=rating.mov_id
AND reviewer.rev_name IS NOT NULL
AND rating.rev_stars IS NOT NULL
ORDER BY rev_name, mov_title, rev_stars;
Sample Output:
rev_name | mov_title | rev_stars --------------------------------+----------------------------------------------------+----------- Brandt Sponseller | Aliens | 8.40 Flagrant Baronessa | Lawrence of Arabia | 8.30 Hannah Steele | Donnie Darko | 8.10 Jack Malvern | The Innocents | 7.90 Josh Cates | Good Will Hunting | 4.00 Krug Stillo | Braveheart | 7.70 Mike Salvati | Annie Hall | 8.10 Paul Monks | Boogie Nights | 3.00 Richard Adams | Beyond the Sea | 6.70 Righty Sock | Titanic | 7.70 Righty Sock | Vertigo | 8.40 Sasha Goldshtein | American Beauty | 7.00 Simon Wright | The Usual Suspects | 8.60 Victor Woeltjen | Avatar | 7.30 Vincent Cadena | Slumdog Millionaire | 8.00 (15 rows)
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال