datacamp-logo

Queries with GROUPING SETS

What question CANNOT be answered by the following query?

SELECT 
  r.customer_id, 
  m.genre, 
  AVG(r.rating), 
  COUNT(*)
FROM renting AS r
LEFT JOIN movies AS m
ON r.movie_id = m.movie_id
GROUP BY GROUPING SETS ((r.customer_id, m.genre), (r.customer_id), ());
Answer the question
50 XP
Possible Answers
  • press
  • press
  • press
  • press