SQL Problems
Source: Problem prompts adapted from Ace the Data Science Interview — Chapter 8 Medium set (Huo & Singh). Seeds, SQLite solutions, and model answers here are original for this course.
Twelve harder query problems (retention, concurrency, market-basket, rolling earnings) plus two system-design write-ups. Same runner as the Easy set: per-problem seed, Data tab, SQLite wrap execution. Prefer CASE, window functions, and CTEs; watch date filters carefully (several prompts use fixed as-of dates so results are reproducible).
Query problems (8.22–8.33)
Systems design (8.34–8.35)
Using “map” and “intersection”, explain:
Given the Facebook friendship graph, how would you use MapReduce to count mutual friends for every pair of users?
Minimum 55 words. Your answer must include: “map”, “intersection”.
Meet the writing requirements, then you can open the model answer.
Back: SQL problems — Easy · Next: Coding interviews.