Canonical SQL Question Index
Question-bank contract
Use stable Q numbers. The index preserves company, pattern, difficulty, and solved status, while each answer lives at one exact concept or drill anchor.
Pattern routing table
| Pattern | Meaning | Key SQL |
|---|
| P1 | Ranking / Top-N Per Group | ROW_NUMBER, RANK, DENSE_RANK + PARTITION BY |
| P2 | Running Totals / Cumulative | SUM() OVER (ORDER BY) |
| P3 | LAG / LEAD β Row-over-Row | LAG(), LEAD() |
| P4 | Gaps & Islands | date - ROW_NUMBER() island grouping |
| P5 | Sessionization | LAG() gap detection + cumulative SUM as session_id |
| P6 | Deduplication | ROW_NUMBER() PARTITION BY, keep rank = 1 |
| P7 | Self-Join | Same table aliased twice |
| P8 | Cross Join β Combinations | CROSS JOIN for Cartesian product |
| P9 | Market Basket / Co-occurrence | Self-join on order_id, item1 < item2 |
| P10 | Conditional Aggregation / Pivot | SUM(CASE WHEN ...) |
| P11 | Cohort / Retention Analysis | MIN(event_date) as cohort + date offset |
| P12 | Date Arithmetic | DATEDIFF, DATE_TRUNC, INTERVAL |
| P13 | Recursive CTE | WITH RECURSIVE anchor + recursive step |
| P14 | Median / Percentile | PERCENTILE_CONT or ROW_NUMBER median trick |
| P15 | Funnel Analysis | Multi-stage COUNT DISTINCT + conversion rate |
Quick-recall aliases
These are navigation aliases only; the complete explanation stays with its canonical owner.
Window-function aliases (P1-P3)
Alias P1: Ranking / Top-N Per Group
Alias owner: Open the canonical pattern.
Recall cue: ROW_NUMBER, RANK, DENSE_RANK + PARTITION BY.
Alias P2: Running Totals / Cumulative
Alias owner: Open the canonical pattern.
Recall cue: SUM() OVER (ORDER BY).
Alias P3: LAG / LEAD β Row-over-Row
Alias owner: Open the canonical pattern.
Recall cue: LAG(), LEAD().
Hard-pattern aliases (P4-P6)
Alias P4: Gaps & Islands
Alias owner: Open the canonical pattern.
Recall cue: date - ROW_NUMBER() island grouping.
Alias P5: Sessionization
Alias owner: Open the canonical pattern.
Recall cue: LAG() gap detection + cumulative SUM as session_id.
Alias P6: Deduplication
Alias owner: Open the canonical pattern.
Recall cue: ROW_NUMBER() PARTITION BY, keep rank = 1.
Join-pattern aliases (P7-P9)
Alias P7: Self-Join
Alias owner: Open the canonical pattern.
Recall cue: Same table aliased twice.
Alias P8: Cross Join β Combinations
Alias owner: Open the canonical pattern.
Recall cue: CROSS JOIN for Cartesian product.
Alias P9: Market Basket / Co-occurrence
Alias owner: Open the canonical pattern.
Recall cue: Self-join on order_id, item1 < item2.
Aggregation aliases (P10-P12)
Alias P10: Conditional Aggregation / Pivot
Alias owner: Open the canonical pattern.
Recall cue: SUM(CASE WHEN ...).
Alias P11: Cohort / Retention Analysis
Alias owner: Open the canonical pattern.
Recall cue: MIN(event_date) as cohort + date offset.
Alias P12: Date Arithmetic
Alias owner: Open the canonical pattern.
Recall cue: DATEDIFF, DATE_TRUNC, INTERVAL.
Advanced-analysis aliases (P13-P15)
Alias P13: Recursive CTE
Alias owner: Open the canonical pattern.
Recall cue: WITH RECURSIVE anchor + recursive step.
Alias owner: Open the canonical pattern.
Recall cue: PERCENTILE_CONT or ROW_NUMBER median trick.
Alias P15: Funnel Analysis
Alias owner: Open the canonical pattern.
Recall cue: Multi-stage COUNT DISTINCT + conversion rate.
Question bank
Q-SQL-001: Top 2 highest-grossing products within each category in 2022
Company: Amazon
Pattern: P1
Difficulty: Medium
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L38.
Q-SQL-002: Top 3 salaries in each department
Company: FAANG Classic
Pattern: P1
Difficulty: Medium
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L39.
Q-SQL-003: Email activity rank per user (sent + received + spam, dense ranked)
Company: Google
Pattern: P1
Difficulty: Medium
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L40.
Q-SQL-004: Top 2 users per company with most calls (maintain ties)
Company: RingCentral
Pattern: P1
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L41.
Q-SQL-005: Most-used vehicle type in past year (excluding cancelled rides)
Company: Uber
Pattern: P1
Difficulty: Easy-Med
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L42.
Q-SQL-006: Olympic swimmers who won ONLY gold medals β count golds each
Company: Amazon
Pattern: P1
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L43.
Q-SQL-007: Nominee who won the most Oscars
Company: Netflix
Pattern: P1
Difficulty: Easy
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L44.
Q-SQL-008: Top 10 users by total distance across all rides
Company: Lyft
Pattern: P1
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L45.
Q-SQL-009: Top 5 product pairs most frequently purchased together
Company: Interview Query
Pattern: P1+P9
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L46.
Q-SQL-010: Top 3 departments by average salary
Company: Classic
Pattern: P1
Difficulty: Easy
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L47.
Q-SQL-011: Cumulative merchant transaction balance, reset at start of each month
Company: Visa
Pattern: P2
Difficulty: Hard
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L48.
Q-SQL-012: Cumulative users added daily, reset at start of each month
Company: Interview Query
Pattern: P2
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L49.
Q-SQL-013: Running total revenue by product category in 2022
Company: Generic
Pattern: P2
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L50.
Q-SQL-014: Cumulative salary of employee for 3 months excluding most recent (LeetCode Hard)
Company: LeetCode
Pattern: P2
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L51.
Q-SQL-015: Total server fleet uptime across overlapping maintenance windows
Company: Amazon
Pattern: P2+P12
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L52.
Q-SQL-016: Month-over-month change in revenue for 2019
Company: Interview Query
Pattern: P2+P3
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L53.
Q-SQL-017: Duplicate payments: same merchant+card+amount within 10 minutes
Company: Stripe
Pattern: P3
Difficulty: Hard
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L54.
Q-SQL-018: Average delay between sign-up and 2nd ride (in-the-moment users)
Company: Uber
Pattern: P3
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L55.
Company: Twitter
Pattern: P2
Difficulty: Medium
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L56.
Q-SQL-020: % buyers who purchased AirPods directly after iPhone (next purchase)
Company: Apple
Pattern: P3
Difficulty: Hard
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L57.
Company: Facebook
Pattern: P3
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L58.
Q-SQL-022: 3 largest month-over-month call declines by company
Company: RingCentral
Pattern: P3
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L59.
Q-SQL-023: Users whose 2nd purchase was within 48 hours of 1st
Company: Amazon
Pattern: P3
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L60.
Q-SQL-024: Rows where purchase amount grew vs previous transaction
Company: Classic
Pattern: P3
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L61.
Q-SQL-025: Top 3 users with longest continuous login streak
Company: StrataScratch
Pattern: P4
Difficulty: Hard
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L62.
Q-SQL-026: Employees who worked consecutive days for at least 5 days straight
Company: Classic
Pattern: P4
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L63.
Q-SQL-027: Periods of inactivity for each supplier β longest gap between orders
Company: Classic
Pattern: P4
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L64.
Q-SQL-028: Users who placed orders every week for 4+ consecutive weeks
Company: LeetCode variant
Pattern: P4
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L65.
Q-SQL-029: Stocks with consecutive days of price increases (3+ in a row)
Company: Bloomberg variant
Pattern: P4
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L66.
Q-SQL-030: Date ranges when a server was continuously online
Company: Amazon/Google
Pattern: P4
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L67.
Q-SQL-031: Users with no activity for 30+ days at any point in history
Company: PracticeWindowFunctions
Pattern: P4
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L68.
Q-SQL-032: Assign session_id to each event (new session = 30 min inactivity)
Company: Mode Analytics
Pattern: P5
Difficulty: Hard
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L69.
Q-SQL-033: Average session duration per user (session = 30 min gap)
Company: Google
Pattern: P5
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L70.
Q-SQL-034: Users with highest number of sessions in a given month
Company: Facebook
Pattern: P5
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L71.
Q-SQL-035: Sessions that resulted in a purchase within the same session
Company: Amazon
Pattern: P5
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L72.
Q-SQL-036: Users whose first session was as viewer but later became streamer
Company: Twitch
Pattern: P5
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L73.
Q-SQL-037: Count duplicate customer_id entries from ETL bug
Company: Amazon
Pattern: P6
Difficulty: Easy
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L74.
Q-SQL-038: From CDC table, keep most recent record per customer_id
Company: Databricks
Pattern: P6
Difficulty: Medium
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L75.
Q-SQL-039: Duplicate transaction_ids β keep record with highest amount
Company: Stripe variant
Pattern: P6
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L76.
Q-SQL-040: Users with more than one account (same email, different user_ids)
Company: Facebook
Pattern: P6
Difficulty: Easy
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L77.
Q-SQL-041: Deduplicate user_profiles keeping lowest user_id per email
Company: Meta
Pattern: P6
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L78.
Q-SQL-042: Employees who earn more than their direct manager
Company: Amazon/Microsoft
Pattern: P7
Difficulty: Medium
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L79.
Q-SQL-043: Friend recommendations: users who attend 2+ same events, not already friends
Company: Facebook
Pattern: P7
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L80.
Q-SQL-044: Pairs of students in same class who scored within 5 points of each other
Company: Academic
Pattern: P7
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L81.
Q-SQL-045: Cheapest two-stop routes between any origin-destination pair
Company: Delta Airlines
Pattern: P7
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L82.
Q-SQL-046: Players who beat same opponent at least twice
Company: Sports
Pattern: P7
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L83.
Q-SQL-047: Managers with at least 5 direct reports
Company: LeetCode
Pattern: P7
Difficulty: Easy
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L84.
Q-SQL-048: All possible size-color combinations for new product line
Company: Generic retail
Pattern: P8
Difficulty: Easy
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L85.
Q-SQL-049: Full date Γ product grid, LEFT JOIN sales to find zero-sales days
Company: Amazon/Walmart
Pattern: P8
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L86.
Q-SQL-050: Full round-robin tournament schedule from teams table
Company: Sports / McKinsey
Pattern: P8
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L87.
Q-SQL-051: All 3-topping pizza combinations with total cost
Company: McKinsey
Pattern: P8
Difficulty: Medium
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L88.
Q-SQL-052: Full region Γ category grid for monthly report (zero-fill)
Company: Retail DE
Pattern: P8
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L89.
Q-SQL-053: Top 5 pairs of products most frequently bought together
Company: Interview Query
Pattern: P9
Difficulty: Hard
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L90.
Q-SQL-054: Product most commonly bought alongside Product X
Company: Amazon/Instacart
Pattern: P9
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L91.
Q-SQL-055: Product pairs where co-purchase count > 100 with lift score
Company: E-commerce
Pattern: P9
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L92.
Company: Swiggy
Pattern: P9
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L93.
Q-SQL-057: Downloads for paying vs non-paying users by date (filter where non-paying > paying)
Company: Microsoft
Pattern: P10
Difficulty: Medium
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L94.
Q-SQL-058: Click-through rate: 100 Γ clicks / impressions per app
Company: Facebook
Pattern: P10
Difficulty: Medium
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L95.
Q-SQL-059: Pivot monthly revenue by product category (categories become columns)
Company: Walmart
Pattern: P10
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L96.
Q-SQL-060: Users active on exactly 3 out of past 7 days
Company: Facebook/Google
Pattern: P10
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L97.
Q-SQL-061: Orders placed per quarter (Q1,Q2,Q3,Q4) as separate columns per user
Company: Amazon
Pattern: P10
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L98.
Q-SQL-062: Twitch users who are both streamers and viewers β count sessions per type
Company: Twitch
Pattern: P10
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L99.
Q-SQL-063: Monthly active users in July 2022 (active in BOTH June and July)
Company: Facebook
Pattern: P11
Difficulty: Hard
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L100.
Q-SQL-064: Retention rate of monthly sign-up cohort for months 1, 2, and 3
Company: Interview Query
Pattern: P11
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L101.
Q-SQL-065: Day-7 retention rate for January 2024 sign-ups
Company: Google/Facebook
Pattern: P11
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L102.
Q-SQL-066: Weekly sign-up cohort: % who made 2nd purchase within 30 days
Company: Amazon
Pattern: P11
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L103.
Q-SQL-067: D1, D7, D30 retention side-by-side per monthly sign-up cohort
Company: Meta
Pattern: P11
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L104.
Q-SQL-068: How unsubscribes affect login rates over 4 weeks after event
Company: Interview Query
Pattern: P11
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L105.
Q-SQL-069: Days between first and last post of year per user (at least 2 posts)
Company: Facebook
Pattern: P12
Difficulty: Medium
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L106.
Q-SQL-070: Average hours between order placement and delivery (2023)
Company: Amazon
Pattern: P12
Difficulty: Easy
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L107.
Company: HR
Pattern: P12
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L108.
Q-SQL-072: % incomplete orders and revenue lost in past 90 days
Company: Uber
Pattern: P12
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L109.
Q-SQL-073: Subscription renewals more than 7 days late
Company: PayPal/Stripe
Pattern: P12
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L110.
Q-SQL-074: All employees reporting directly/indirectly to manager_id = 5
Company: Amazon/Microsoft
Pattern: P13
Difficulty: Hard
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L111.
Q-SQL-075: Total subordinate count (direct + indirect) for each manager
Company: Google
Pattern: P13
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L112.
Q-SQL-076: Product categories and all subcategories recursively
Company: E-commerce
Pattern: P13
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L113.
Q-SQL-077: Full dependency chain for a given task (task depends on task)
Company: Project Mgmt
Pattern: P13
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L114.
Q-SQL-078: Generate date spine 2024-01-01 to 2024-12-31 using recursive CTE
Company: DE Pattern
Pattern: P13
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L115.
Q-SQL-079: All reachable destinations from an origin city (multi-hop flights)
Company: Delta Airlines
Pattern: P13
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L116.
Company: Google
Pattern: P14
Difficulty: Hard
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L117.
Company: LeetCode Hard
Pattern: P14
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L118.
Q-SQL-082: 90th percentile response time per API endpoint in past week
Company: Engineering
Pattern: P14
Difficulty: Medium
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L119.
Q-SQL-083: Divide users into 4 quartiles by total purchase amount 2023
Company: Retail/Amazon
Pattern: P14
Difficulty: Medium
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L120.
Company: E-commerce
Pattern: P14
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L121.
Q-SQL-085: Count of users at each funnel stage + step-to-step conversion rate
Company: TikTok/Stripe
Pattern: P15
Difficulty: Hard
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L122.
Q-SQL-086: Signup-to-activation rate (confirmed phone / total signed up)
Company: TikTok
Pattern: P15
Difficulty: Medium
Solved in legacy guide: β
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L123.
Q-SQL-087: Drop-off rate at each step of onboarding funnel
Company: DoorDash/Instacart
Pattern: P15
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L124.
Q-SQL-088: Click-through-to-conversion rate per ad campaign
Company: Google Ads
Pattern: P15
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L125.
Q-SQL-089: Funnel step with highest drop-off for new users in first 7 days
Company: Facebook/Uber
Pattern: P15
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L126.
Q-SQL-090: Free trial β paid conversion rate changes across monthly cohorts
Company: SaaS/Stripe
Pattern: P15
Difficulty: Hard
Solved in legacy guide: No
Answer owner: Open the exact canonical drill.
Alternate source wording: SQL_QUESTION_BANK.md#L0.
How to extend this index
Assign the next stable Q number, record the question, company, pattern, difficulty, and solved state, then add the solution under the owning pattern. Never renumber an existing question.
Q91 | question text | company | P? | Medium/Hard | solved?
Classification-inbox contract
Unclassified interview questions remain pending until their output grain and canonical P1-P15 pattern are identified.