https://leetcode.com/problems/all-valid-triplets-that-can-represent-a-country/
Account Login - LeetCode
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.
leetcode.com
select a.student_name as member_A, b.student_name as member_B, c.student_name as member_C
from SchoolA as a, SchoolB as b, SchoolC as c
where a.student_name <> b.student_name and b.student_name <> c.student_name and a.student_name <> c.student_name and a.student_id <> b.student_id and b.student_id <> c.student_id and a.student_id <> c.student_id
728x90
반응형
'자료구조 알고리즘 > 코딩테스트' 카테고리의 다른 글
740. Delete and Earn (0) | 2022.06.18 |
---|---|
1777. Product's Price for Each Store (0) | 2022.06.18 |
1587. Bank Account Summary II (0) | 2022.06.18 |
1571. Warehouse Manager (0) | 2022.06.18 |
198. House Robber (0) | 2022.06.11 |