문제
SQLite
내가 작성한 정답
with ee as (select employee_id, name, department
from employees
where join_date >= date('2021-12-31','-3 month') ),
o as ( select employee_id, name, department
from employees
where join_date <= date('2021-12-31','-2 year'))
select e.employee_id mentee_id, e.name mentee_name,
o.employee_id mentor_id, o.name mentor_name
from ee e
left join o o on e.department <> o.department
order by 1, 3;Share article