1. Learn
  2. /
  3. Courses
  4. /
  5. Analyzing Business Data in SQL

Connected

Exercise

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.

Instructions

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