2024.12.05 7일차 수업
문제 1) 20년 이상 근무한 사원들의 employee_id, salary, grade_level, 근무 연수, department_name, city를 출력하시오. 1. Oracle 방법select e.employee_id, e.salary, trunc(months_between(sysdate, hire_date)/12) 근무연수, j.grade_level, d.department_name, l.cityfrom hr.employees e, hr.job_grades j, hr.departments d, hr.locations lwhere months_between(sysdate, e.hire_date)/12 >= 20and e.salary between j.lowest_sal and j.high..
더보기
2024.12.04 6일차 수업
문제 1) 80 부서에 근무하는 사원들의 last_name, job_id, department_name, city를 출력하시오.select e.last_name, e.job_id, d.department_name, l.cityfrom hr.employees e, hr.departments d, hr.locations lwhere e.department_id = d.department_idand d.location_id = l.location_idand e.department_id = 80;▶ 하지만 결과가 같다면 더 성능 좋게 셀프 튜닝으로 join 할 수도 있다. (카티션 곱 유발)▶ 문장 튜닝할 때 더 자세하게 배울 예정이다.select e.last_name, e.job_id, d.department..
더보기