Skip to main content
Find Users Who Never Completed Their Profile

A SaaS company wants to improve user onboarding by identifying users who signed up for the platform but never completed their profile setup. The product team considers a profile completed only when a corresponding record exists in the user_profiles table. Your task is to find all users who have not completed their profiles yet. The company stores basic account information in a users table and optional profile details in a user_profiles table. Not every user completes onboarding immediately after registration, so some users may not have matching profile records. Schema Summary: The users table contains: user_id , full_name , email , and signup_date . The user_profiles table contains: profile_id , user_id , bio , and country . Your query should return the users who do not have any matching profile records. This is a common SQL interview pattern that tests your understanding of joins and NULL filtering. Return the user ID, full name, and email address. Include only users without a matching record in user_profiles . Sort the results by user_id in ascending order. Hint: Use a LEFT JOIN between the tables and check for NULL values from the profile table. Common Pitfall: Using an INNER JOIN will exclude users without profiles, which is the opposite of the requirement.

Table Setup (SQL Schema)

CREATE TABLE users 
(user_id INT PRIMARY KEY, full_name VARCHAR(100), email VARCHAR(100), signup_date DATE); 

CREATE TABLE user_profiles 
(profile_id INT PRIMARY KEY, user_id INT REFERENCES users(user_id), bio TEXT, country VARCHAR(50)); 

INSERT INTO users (user_id, full_name, email, signup_date) 
VALUES 
(1, 'Aarav Sharma', '[email protected]', '2026-01-05'), 
(2, 'Priya Reddy', '[email protected]', '2026-01-08'), 
(3, 'Rahul Mehta', '[email protected]', '2026-01-10'), 
(4, 'Sneha Kapoor', '[email protected]', '2026-01-12'), 
(5, 'Vikram Das', '[email protected]', '2026-01-15'); 

INSERT INTO user_profiles (profile_id, user_id, bio, country) 
VALUES (101, 1, 'Data Analyst and coffee enthusiast', 'India'), 
(102, 3, 'Backend developer', 'India'), 
(103, 5, 'Startup founder', 'Singapore');
HomeVideosBlog