Try solving this issue

Report a typo

In the result set of this query, we see 2 rows with "All MPAA Ratings" and "ALL directors" one of them equals 116.2 and another equals 115.3. Which one represents the ground average of all MPAA ratings and all directors?

SELECT
    COALESCE("MPAA_Rating",'All MPAA Ratings') as "MPAA_Rating",
    COALESCE("Director",'ALL directors') as "Director",
    AVG("Length_Minutes"),
    grouping("MPAA_Rating","Director")
FROM death_count_table
WHERE "Year">=2000
GROUP BY ROLLUP ("MPAA_Rating","Director")
ORDER BY 1,2;

The result set of query

(source for data)

Select one option from the list
___

Create a free account to access the full topic