The Revenue Cliff
A medium SQL mock interview question on DataDriven, with an AI interviewer who asks follow-up questions and a hire or no-hire decision at the end.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L4
Interview Prompt
We're watching our monthly revenue in `transactions` for sharp declines: for each `month` ('YYYY-MM'), earliest first, show `revenue_thousands` and `pct_change` against the month before. Put 'ALERT' in an `alert` column for any month that fell by more than 10%, and leave it null otherwise.
Summary
Revenue was climbing. Then it wasn't. Spot the drop.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write and run your SQL against a real database
- Answer the interviewer's follow-up questions, then get a hire or no-hire decision