Loading...

NULL Keys in Joins

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

Domain
SQL
Difficulty
easy
Seniority
junior

Problem

A downstream dashboard is reporting fewer content views than expected. The content_views table has 100 records, but some views were logged without a user association. Write a query that pairs content_views to users on user_id and returns each view's ID, user ID, and username. Then reason about why the result has fewer than 100 rows.

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.