电影 25 的评分
电影评分可以帮助我们了解客户偏好。请汇总并报告 ID 为 25 的电影的评分统计信息,包括最小值、最大值、平均值以及评分条数。
本练习是课程的一部分
用 SQL 进行数据驱动决策
练习说明
- 从表
renting中选取movie_id为 25 的所有租赁记录。 - 在这些记录上,计算评分的最小值、最大值和平均值,并统计该电影的评分数量。
交互式实操练习
通过完成这段示例代码来试试这个练习。
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