SQL · Meta · Medium
We have two tables: users column type user_id INT signup_date DATE activity column type user_id INT activity_date DATE A row in activity means the user had some activity on that date. If multiple activity rows exist for the same (user_id, activity_date), treat that user as present once for that date. For a given activity date d, a user is labeled new while d falls within the inclusive 30-day period that begins on signup_date and ends on signup_date + 29 days. Otherwise, the…
Checking your access…