File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ -- @ss.idx: 5
2+ -- @ss.level: 3
3+ -- @ss.title: 작품이 없는 작가 찾기
4+ -- @ss.slug: artists-without-artworks
5+ -- @ss.category: JOIN/UNION
6+ -- @ss.note:
7+
8+ SELECT ar .artist_id
9+ , ar .name
10+ FROM artists ar
11+ WHERE ar .death_year IS NOT NULL
12+ AND NOT EXISTS (
13+ SELECT 1
14+ FROM artworks a
15+ JOIN artworks_artists aa ON a .artwork_id = aa .artwork_id
16+ WHERE aa .artist_id = ar .artist_id
17+ );
Original file line number Diff line number Diff line change 1+ -- @ss.idx: 6
2+ -- @ss.level: 3
3+ -- @ss.title: 멘토링 짝꿍 리스트
4+ -- @ss.slug: mentor-mentee-list
5+ -- @ss.category: JOIN/UNION
6+ -- @ss.note:
7+
8+ SELECT
9+ e1 .employee_id AS mentee_id,
10+ e1 .name AS mentee_name,
11+ e2 .employee_id AS mentor_id,
12+ e2 .name AS mentor_name
13+ FROM employees e1
14+ LEFT JOIN employees e2 ON e2 .department != e1 .department
15+ AND e2 .join_date <= DATE_SUB(' 2021-12-31' , INTERVAL 2 YEAR)
16+ WHERE e1 .join_date >= DATE_SUB(' 2021-12-31' , INTERVAL 3 MONTH)
17+ ORDER BY mentee_id, mentor_id;
You can’t perform that action at this time.
0 commit comments