SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Top Merchants With a Transaction Drop

Unsolved

Stripe's account managers want to reach out to large merchants that are slowing down. First, rank merchants by total payment volume (sum of amount) from 2025-01-01 through 2025-03-31 and take the top 4. Then keep only those whose number of transactions in March 2025 is lower than in February 2025. A merchant with no March transactions has a March count of 0. Transactions outside Q1 2025 are ignored for both steps. Write an SQL query that returns merchant_id, merchant_name, total_volume, feb_txns and mar_txns. Order the results by total_volume descending.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
🏢 Stripe

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM merchants
Full source dataset
6 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine