Question: Average Film Length by Category Description List the rounded average film lengths for each film category. Arrange the values in the decreasing order of the

Average Film Length by Category

Description

List the rounded average film lengths for each film category. Arrange the values in the decreasing order of the average film lengths.

Sample Output

use upgrad;

# Write your code below

select round(avg(length)) as avg_Length, category.name as name from film join film_category using (film_id) join category using (category_id) group by name order by avg_Length desc limit 1 ;

## Sir i applied this piece of code for a sql query pls tell me what is error because my all test cases are not passed.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!