Coding Test

Leecode - 1350. Students With Invalid Departments

Indo Yoon

Problem

LeetCode - The World’s Leading Online Programming Learning Platform
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

Solution

SELECT Students.id, Students.name
FROM Students
WHERE Students.department_id NOT IN (SELECT id FROM Departments)