Skip to main content

Command Palette

Search for a command to run...

LeetCode 584: Find Customer Referee

Solution Guide for LeetCode 584: Find Customer Referee

Updated
1 min read
LeetCode 584: Find Customer Referee
V

I'm Varchasv, a Data Engineer working on enterprise data integration.

Currently on a 90-problem challenge to level up my technical skills and switch to a more development-focused role.

What I'm doing:

  • Solving 2 Leetcode problems daily (SQL + DSA).
  • Blogging about each problem.
  • Building in public.

My Goal - Land a better data engineering role by mid-2026.

Follow my journey !!

Date: January 26, 2026
Category: SQL
Time Taken: 1 minute
Difficulty: Easy


Problem Statement

Find the names of the customer that are either:

  1. referred by any customer with id != 2.

  2. not referred by any customer.

Link: Find Customer Referee


My Approach

Since we only need names not referred by customer 2 or with no referral, it is a very basic problem.


Solution Code

SELECT name
FROM Customer
WHERE referee_id != 2 OR referee_id IS NULL

Key Takeaway: Nothing, very easy problem.

Pattern: Filter

Mistakes I Made: None

Series: 90 Days of Data Engineering Progress: 19/90 problems completed

Tags: #DEQuest #LeetCode #SQL #DataEngineering #BuildInPublic

90 Days of Data Engineering

Part 20 of 48

Solving 90 problems over 18 weeks. Daily posts Mon-Fri. Goal: Switch to development role.

Up next

LeetCode 424: Longest Repeating Character

Solution Guide for LeetCode 424: Longest Repeating Character