product_launches has one row per card launch (card_id, launch_date) and issuance_records has one row per card issued (card_id, issue_date, issue_id). For each launched card, count the cards issued in its first month, defined as issue_date on or after launch_date and no more than 30 days after it (launch_date + 30 days inclusive). Cards with no issues in that window show 0. Output columns: card_id, first_month_issues. Order by card_id ascending.
| Column | Type |
|---|---|
| card_id | INTEGER |
| launch_date | DATE |
| card_id | launch_date |
|---|---|
| 10 | 2026-01-01 |
| 20 | 2026-01-15 |
| Column | Type |
|---|---|
| card_id | INTEGER |
| issue_date | DATE |
| issue_id | INTEGER |
| card_id | issue_date | issue_id |
|---|---|---|
| 10 | 2026-01-03 | 1 |
| 10 | 2026-01-20 | 2 |
| 10 | 2026-02-02 | 3 |
| 20 | 2026-01-20 | 4 |
| 20 | 2026-02-10 | 5 |
| card_id | first_month_issues |
|---|---|
| 10 | 2 |
| 20 | 2 |
Solve it in the live editor on this page — run on sample data, then submit against hidden tests.
{{ totalCount }} questions in the style asked at Amazon, Microsoft, Google, Meta, Flipkart and more — {{ hardPct }}% Hard. Write SQL in a real database engine in your browser, run it on sample data, then evaluate against hidden tests.
Company tags show where this type of question is commonly reported in interviews. Questions, data and solutions are written by TechTown.
{{ cur.statement }}
No submissions yet. Press Evaluate to submit your query.
{{ solutionSql }}
{{ out.error }}
You have solved your 3 free questions — nice work! Log in (free) to unlock all 150 questions, keep your streak and appear on the leaderboard.