Can someone explain why we use the first code where the refunded = false is in the join statement and not in the where condition?
It seems like the lesson is saying that we use it in the join and not where because if we use it in the where we exclude the free users since they never made a purchase but isnt this what we want? I thought ARPU was total revenue / total paying customers..
If I use the code where the refunded = false is in the join statement and count distinct id from the users table then im counting every user who has a utm_campaign.
Also, why do we say utm_campaign has to be null.. shouldnt ARPU just look at total revenue/paying customers regardless of whether or not they came from our marketing?
I have a table with 3 columns: day of month, client_uk, flag_login (Y/N). My task is to group this table over by month to determine what flag_login should be for each month for every client. The client could be login a few time per month, for me, it doesn’t matter and I should determine whether the fact of client login at least 1 time per month. If it’s yes flag_login should Y, in opposite case ‘N’.
I don’t know how to solve it, because my window for window function should be client_uk and month simultaneously.
Thanks for the help in advance!