SQL · ByteDance · Medium
You are given two relational tables: users(user_id, registered_at) — each row records one user and the timestamp at which that user registered. Every user_id value in this table is unique. posts(post_id, user_id, created_at) — each row records one published post, the author, and the publication timestamp. Write a SQL query that, for every calendar date, reports how many distinct users satisfy both of the following on that same date: they registered on that date, and they…
Checking your access…