Advertisement
a_khuzina

SQL_example

Jan 20th, 2022
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT rating,
  2.        MIN(length) AS min_length,
  3.        MAX(length) AS max_length,
  4.        AVG(length) AS avg_length,
  5.        MIN(rental_rate) AS min_rental_rate,
  6.        MAX(rental_rate) AS max_rental_rate,
  7.        AVG(rental_rate) AS avg_rental_rate
  8. FROM movie
  9. WHERE rental_rate > 2
  10. GROUP BY rating
  11. ORDER BY avg_length
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement