Aan de slagGa gratis aan de slag

Ratings of movie 25

The movie ratings give us insight into the preferences of our customers. Report summary statistics, such as the minimum, maximum, average, and count, of ratings for the movie with ID 25.

Deze oefening maakt deel uit van de cursus

Data-Driven Decision Making in SQL

Cursus bekijken

Oefeninstructies

  • Select all movie rentals of the movie with movie_id 25 from the table renting.
  • For those records, calculate the minimum, maximum and average rating and count the number of ratings for this movie.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

SELECT ___ min_rating, -- Calculate the minimum rating and use alias min_rating
	   ___ max_rating, -- Calculate the maximum rating and use alias max_rating
	   ___ avg_rating, -- Calculate the average rating and use alias avg_rating
	   ___ number_ratings -- Count the number of ratings and use alias number_ratings
FROM renting
___; -- Select all records of the movie with ID 25
Code bewerken en uitvoeren