Skip to content

Commit 7b9639b

Browse files
authored
Create 1623-all-valid-triplets-that-can-represent-a-country.sql
1 parent eb4a524 commit 7b9639b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Write your MySQL query statement below
2+
SELECT sa.student_name AS member_a
3+
, sb.student_name AS member_b
4+
, sc.student_name AS member_c
5+
FROM schoola sa CROSS JOIN schoolb sb
6+
CROSS JOIN schoolc sc
7+
WHERE sa.student_name != sb.student_name
8+
AND sa.student_name != sc.student_name
9+
AND sb.student_name != sc.student_name
10+
AND sa.student_id != sc.student_id
11+
AND sb.student_id != sc.student_id
12+
AND sa.student_id != sb.student_id;

0 commit comments

Comments
 (0)