At the heart of every company is revenue, and Mineblocks is no exception. For our first KPI we’ll calculate daily revenue.



Daily Revenue is simply the sum of money made per day.

To get close to Daily Revenue, we calculate the daily sum of the prices in the purchases table. Complete the query by using the sum function and passing the price column from the purchases table.

select date(created_at), round(sum(/**/), 2) from /**/ group by 1 order by 1;

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?