Daily Active Users 1 vs 2


#1

https://www.codecademy.com/courses/sql-analyzing-business-metrics/lessons/common-metrics/exercises/daily-active-users-i?action=lesson_resume&link_content_target=interstitial_lesson

I solved the first exercise on Daily active users, and then I also solved the second part, where it is required to take into account the platform too. My concern is that, if I look at the results from both queries, it looks like the number of daily users is different. For example, with the first query, on 2015-08-04 we have 99 users, but with the second query, for that day, we have 27+42+36=105 users. What am I missing?

Below the queries that I used.

Thank you.



select date(created_at),
count(distinct user_id) as dau
from gameplays
group by 1
order by 1;


select date(created_at),
platform,
count(distinct user_id) as dau
from gameplays
group by 1,2
order by 1,2;



#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.