Loading...

User 360

A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
hard

Problem

The product team wants a one-row-per-user activity summary, including users with zero activity. For every user, count their rows in transactions and their rows in user_sessions, substituting 0 when either side is empty. Return the username, transaction count, and session count.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.