Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- oracle
- 백준
- 5639
- Unreal
- 비재귀셰그먼트
- 언리얼 커스텀 플러그인
- OS
- 1253번
- command not found
- Security
- C++
- 데이터베이스 배움터
- 언리얼 플러그인
- UActor
- hackerank
- 민겸수
- objtofbx
- 오손데이터읽기
- FBX
- Linux
- 백준 1253번
- 실습
- 의미와 무의미의 경계에서
- 셰그먼트트리
- 1759번
- 1967번
- SQL
- 트랜잭션 관리
- UnrealMP
- 2단계로킹
Archives
- Today
- Total
fatalite
Database Oracle SQL - 실습 5 본문
#1번 문제
select e.last_name, e.department_id, d.department_name
from employees e, departments d
where e.department_id = d.department_id;
#2
select e.job_id, d.location_id
from employees e, departments d
where e.department_id = 80
AND e.department_id = d.department_id
group by e.job_id, d.location_id;
#3
select e.last_name, d.department_name, d.location_id, l.city
from employees e, locations l, departments d
where d.department_id = e. department_id
AND l.location_id = d.location_id
AND e.commission_pct IS NOT NULL;
#4
select e.last_name, d.department_name
from employees e, departments d
where e.department_id = d.department_id
AND e.last_name LIKE '%a%';
#5
select e.last_name, e.job_id, d.department_id, d.department_name
from employees e
join departments d
on(e.department_id = d.department_id)
join locations l
on(d.location_id = l.location_id)
where l.city = 'Toronto';
#6
select
emp.last_name "employee",
emp.employee_id "EMP#",
man.last_name "Manager",
man.employee_id "MGR#"
from (select * from employees) emp
join (select * from employees) man
on emp.manager_id = man.employee_id;
#7
select selected.last_name,
selected.department_id,
colleague.last_name as "COLLEAGUE"
from
(select
last_name, department_id
from employees
where last_name = 'Grant')
selected
join (select last_name,department_id from employees) colleague
on selected.department_id = colleague.department_id
order by colleague.last_name;
#8
select other.last_name, other.hire_date
from
(select last_name, hire_date
from employees where last_name = 'Davies') man
join (select last_name, hire_date from employees) other
on man.hire_date < other.hire_date;
#9
select aa.last_name, aa.hire_date,
bb.last_name, bb.hire_date
from (select * from employees) aa
join (select * from employees) bb
on (aa.manager_id = bb.employee_id)
where (aa.hire_date < bb.hire_date);
'컴퓨터 공학 > Database 데이터베이스' 카테고리의 다른 글
TRANSACTION with Oracle SQL (0) | 2022.12.13 |
---|---|
VIEW & CATALOG with Oracle SQL (0) | 2022.12.13 |
Oracle SQL - 테이블 변경 및 생성 (0) | 2022.12.11 |
Database Oracle SQL - 실습 6 (0) | 2022.12.11 |
Database Oracle SQL - 실습 4 (0) | 2022.12.11 |