SQL · Meta · Medium
Write three PostgreSQL queries from the relational data described below. All timestamp columns are stored in UTC. When reporting by calendar day, derive the day from an impression or click timestamp by casting the UTC timestamp to DATE. Use window functions and CASE WHEN expressions where needed, make deduplication explicit, and return one row per requested grouping. Tables users: user_id INT shops: shop_id INT, shop_name VARCHAR(50), merchant_type VARCHAR(20) posts: post_id…
Checking your access…