SQL · Meta · Medium
Assume the current date is 2025-09-01. The schema is: Sample rows: A. Shop visibility aggregates For 2025-09-01, return one row per shop_id with: unique_viewers: the number of distinct user_id values avg_dwell_seconds: the average dwell_seconds Consider only rows where visible = true. Keep only shops with unique_viewers >= 2. Sort by unique_viewers descending, then by shop_id ascending. Use GROUP BY, HAVING, and ORDER BY. B. Top-of-feed visibility rate by category For…
Checking your access…