BaşlayınÜcretsiz başlayın

Average orders per user

Dave wants to add the average orders per user value to his unit economics study, since more orders usually correspond to more revenue.

Calculate the average orders per user for Dave.

Note: The count of distinct orders is different than the sum of ordered meals. One order can have many meals within it. Average orders per user depends on the count of orders, not the sum of ordered meals.

Bu egzersiz, kursun bir parçasıdır

Analyzing Business Data in SQL

Kursa Göz Atın

Egzersiz talimatları

  • Store the count of distinct orders and distinct users in the kpi CTE.
  • Calculate the average orders per user.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

WITH kpi AS (
  SELECT
    -- Select the count of orders and users
    ___ AS orders,
    ___ AS users
  FROM orders)

SELECT
  -- Calculate the average orders per user
  ROUND(
    ___ :: ___ / ___,
  2) AS arpu
FROM kpi;
Kodu Düzenle ve Çalıştır