ComenzarEmpieza gratis

Executive report

Eve wants to produce a final executive report about the rankings of eateries by the number of unique users who order from them by quarter. She said she'll handle the pivoting, so you only need to prepare the source table for her to pivot.

Send Eve a table of unique ordering users by eatery and by quarter.

Este ejercicio forma parte del curso

Analyzing Business Data in SQL

Ver curso

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

SELECT
  eatery,
  -- Format the order date so "2018-06-01" becomes "Q2 2018"
  TO_CHAR(order_date, ___) AS delivr_quarter,
  -- Count unique users
  ___ AS users
FROM meals
JOIN orders ON meals.meal_id = orders.meal_id
GROUP BY eatery, delivr_quarter
ORDER BY delivr_quarter, users;
Editar y ejecutar código