https://leetcode.com/problems/find-customer-referee/description/?envType=study-plan-v2&id=top-sql-50
Find Customer Referee - LeetCode
Can you solve this real interview question? Find Customer Referee - Table: Customer +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | name | varchar | | referee_id | int | +-------------+---------+ id is the primary
leetcode.com
1
2
3
4
|
# Write your MySQL query statement below
select name
from Customer
where referee_id != '2' or referee_id is null
|
cs |
반응형
'SQL' 카테고리의 다른 글
leetcode 570. Managers with at Least 5 Direct Reports (0) | 2023.06.01 |
---|---|
leetcode 570. Managers with at Least 5 Direct Reports (0) | 2023.05.31 |
leetcode 1757. Recyclable and Low Fat Products (0) | 2023.05.29 |
leetcode https://leetcode.com/problems/last-person-to-fit-in-the-bus/ (0) | 2023.04.21 |
leetcode 1075. Project Employees I (0) | 2023.04.21 |
댓글