Get startedGet started for free

Unit economics

1. Unit economics

Welcome back! So far, you’ve learned about KPIs that measure various aspects of a company’s performance. However, KPIs don’t tell you much about the distribution of a company’s data. In this chapter, you’ll learn about unit economics, histograms, and percentiles; the last two are especially important to understand distributions.

2. Unit economics

Let’s start with unit economics. The KPIs you’ve seen so far measure a company’s overall performance. Revenue, for example, is how much money a company generates overall. In contrast, unit economics measures performance per unit (or user). Rather than revenue, you'd calculate the average revenue per user, or ARPU. The formula for ARPU is the overall revenue divided by the count of users. This tells us how much revenue the company generates from each of its users on average. ARPU is useful because it measures a company’s success at scaling its business model. Even if a company’s overall revenue is increasing, if its ARPU is decreasing, the company is less effective at generating revenue from each of its users. More users are paying, but each of them is paying less. There are two ways to write queries to calculate ARPU.

3. ARPU - query (I)

The first way is to calculate revenue and the count of users, store them in a CTE, then divide the revenue column by the count of users column in the final query. Recall from Chapter 1 that revenue is the sum of each meal’s price times its ordered quantity. GREATEST is used to avoid a division by zero error in case the count of users is 0.

4. ARPU - query (I) by month

The first way is useful because you can easily change it to calculate ARPU by month. If you include a month column in the CTE and group by it, you can select it in the final query and calculate ARPU per month to track its change over time. Delivr’s user locations table isn’t available, but if it were, grouping by user location would've also helped in determining which cities, states, and countries are the most profitable per user.

5. ARPU - query (II)

The second way is to calculate each user's revenue by grouping by user ID. After storing all user IDs and each user ID's revenue in a CTE, simply average the revenue column to calculate ARPU. It’s not as straightforward to calculate ARPU by month or location this way, but later on in this chapter, you’ll use this way to explore the distribution of revenues by user, since you have each user’s revenue.

6. Comparing the two ways

Here is what each CTE stores in the first and second ways. In the first way, you calculate the revenue and user KPIs directly in the kpis CTE, then you divide the revenue column by the count of users column. In the second way, you calculate each user's revenue, then average the revenue column. The second way is more flexible than the first.

7. ARPU - result

Both the first and second ways return the same result. This value is how much money Delivr generates from each of its users on average across their lifetime.

8. Unit economics

Unit economics isn’t restricted to ARPU. In the following exercises, you’ll write queries to calculate ARPU and other per-unit KPIs, such as the average orders per user.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.