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

  1. Read the vague prompt (just like a real interview)
  2. Ask clarifying questions to the AI interviewer
  3. Write your sql solution with real code execution
  4. Get instant feedback and a hire/no-hire decision