자료구조 알고리즘/코딩테스트

1623. All Valid Triplets That Can Represent a Country

내공얌냠 2022. 6. 18. 10:35

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
반응형