Loading interview...
US Active User Share
A medium SQL mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- SQL
- Difficulty
- medium
Interview Prompt
The two tables share one person per row, keyed by users.user_id and customers.customer_id (same integer value, different column name). Count every users row in the denominator. In the numerator, count users rows whose account_status is 'active' AND whose matching customers row has country = 'US'. Users without a matching customers row never count toward the numerator but still count toward the denominator. Return one number: the percentage (numerator / denominator * 100).
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your sql solution with real code execution
- Get instant feedback and a hire/no-hire decision