Chapter 4: Revenue analytics and unit economics

Welcome to the chapter on Unit Economics. 👋

It is, probably, the most important chapter in the whole course. For two reasons: it teaches you how to join tables in SQL and how to analyze profitability of anything on a unit basis.

Unit Economics is a methodology, a framework to analyze marketing or business performance on a unit basis.

Normally, at the end of a financial year, one would look into an accounting book and see something like “the company earned 2 million, spent 1.5 million on salaries, taxes, etc. We’re profitable.” It’s a perfectly fine way to look at business performance, I’d say it’s a must way to look at it. The only problem is that you know these numbers only by the end of the year, when a finance team spent weeks on figuring out the data.

What departments and individual teams need is an approach that would help them make clever decisions on a day-to-day basis. This is where Unit Economics comes into play.

Unit Economics

Unit Economics deals with units of your business and analyzes earnings, profits and expenses on a unit basis. For example, if we know that we earn $100 from a customer in the first year, but we pay $50 to acquire a customer – we’re profitable.

Customer is the ultimate unit for the majority of contemporary businesses. Interestingly, even within one company customers are different – they come from different marketing channels, they use different features, etc. In other words, there’re different cohorts of customers and it’s implicit that we’ll use cohort analysis to calculate Unit Economics metrics.

What other units are out there? Say, we just started a new marketing campaign and we offer a 30 day free trial to all users. It means we’ll know if we get any customers only in a month from now. 🙀

In this situation, we’ll have to rely on other units – how much do we pay for a click? For a user? For a user who started a trial? Knowing costs for these units will help us to make a decisions whether we should invest into a campaign or we should stop it right there.

SQL theory

Another reason this chapter is the most important, it’s because it covers SQL joins.

The previous chapter on marketing covered aggregations, so you’ve learned how to build timelines, cohorts … based on data in one table. In reality, data is often scattered between multiple tables – users live in one table, purchases in another, etc.

That’s the whole idea behind SQL and relational databases – we describe real world with different data models (tables) which have relations between each other (for example, a purchases table has a reference to users – a user_id column aka “a foreign key”).

To fully utilize the power of SQL we need to master joins, all kind of them. Good news, only 2 joins cover 95% of use cases – INNER JOIN and LEFT JOIN. In this chapter you’ll learn and practice both of them + all other join types.

Practical knowledge

This chapter has 32 lessons and exercises that cover most important Unit Economic metrics:

  • ARPU (Average Revenue per User)
  • ROI (Return on Investment)
  • ARPPU (Average Revenue per Paying User)
  • CPA (Cost per Acquisition)
  • CPC (Cost per Click)
  • CAC (Customer Acquisition Cost)

Of course, there’re more units and metrics you can find. That’s why I highly recommend checking out the Practice section of SQL Habit to find more exercises on Unit Economics.

I’ve interviewed a lot of people and was interviewed many times myself. It’s safe to say that every other interview has a question “Tell me all SQL joins you know” or variations like “What’s the difference between INNER JOIN and LEFT JOIN?”.

This chapter is designed not to just give you a plain answer, but build a whole intuition about when and how to use SQL joins. Let’s keep building your SQL Habit! 🚀

Anatoli Makarevich, author of SQL Habit About SQL Habit

Hi, it’s Anatoli, the author of SQL Habit. 👋

SQL Habit is a course (or, as some of the students say, “business simulator”). It’s based on a story of a fictional startup called Bindle. You’ll play a role of their Data Analyst 📊 and solve real-life challenges from Business, Marketing, and Product Management.

SQL Habit course is made of 13 chapters (you’re looking at one atm) that contain 273 bite-sized lessons and exercises. All of them have a real-life setting and detailed explanations. You can immediately apply everything you’ve learned at work. 🚀

The 2nd part of the course is called Practice. It’s made of standalone exercises based on multiple datasets – E-commerce, Finance and Meditation app a-la Headspace or Calm. Practice exercises are harder than in the main course. They’ll get you ready for any challenge at work or an interview. 💪

Reviews

4.97 61 reviews
Dinara, Analyst @Babbel
Mariia, Performance Marketing Team Lead @ CareerFoundry
Blair Young @ Triptease
“well worth the money”

Fluent in SQL in a month

Master Data Analysis with SQL with real life examples from Product Management, Marketing, Finance and more.