[SQL문제풀기] Income By Title and Gender

silver's avatar
Jan 28, 2026
[SQL문제풀기] Income By Title and Gender

문제

내가 작성한 정답

MySQL, PostgreSQL, Oracle

select employee_title, sex, avg(salary+b) avg_compensation from sf_employee e join (select worker_ref_id, sum(bonus) b from sf_bonus group by worker_ref_id) b on e.id = b.worker_ref_id group by employee_title, sex
Share article

silver