문제
내가 작성한 정답
MySQL, PostgreSQL
select department, count(worker_id) "number of workers"
from worker
where joining_date >= '2014-04-01'
group by department
order by 2 desc;Oracle
:where joining_date >= '2014-04-01' 이렇게 날짜 비교할 수 없음
select department, count(worker_id) "number of workers"
from worker
where to_char(joining_date,'yyyy-mm-dd') >= '2014-04-01'
group by department
order by 2 desc;
select department, count(worker_id) "number of workers"
from worker
where joining_date >= to_date('2014-04-01','yyyy-mm-dd')
group by department
order by 2 desc;Share article