Great! That query doesn’t take refunds into account. We’ll update the query to exclude refunds.

Fields like refunded_at will only have data if the transaction was refunded, and otherwise left null.



Update our daily revenue query to exclude refunds.

Complete the query by filtering for refunded_at is null.

select date(created_at), round(sum(price), 2) as daily_rev from purchases where /**/ 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?