Thursday, 20 July 2017

nyoh mi

nomer 9

select l.country_id from locations l where l.country_id = (selectfrom countries c, employees e, departments d, locations l
where e.department_id=d.department_id and
d.location_id=l.location_id and
e.last_name like 'lorentz');
select *from employees e, departments d, locations l
where e.department_id=d.department_id and
d.location_id = l.location_id and
d.location_id = l.location_id and
l.country_id = (select country_id from employees e, departments d, locations l
where e.department_id=d.department_id and
d.location_id = l.location_id and
d.location_id = l.location_id and
e.phone_number like '%7%' and
e.last_name like 'lorentz');


nomer 10

select *from employees e, departments d, locations l
where e.department_id=d.department_id and
d.location_id = l.location_id and
d.location_id = l.location_id and
l.street_address = (select street_address from employees e, departments d, locations l
where e.department_id=d.department_id and
d.location_id = l.location_id and
d.location_id = l.location_id and
e.last_name like 'urman') and
l.city = (select city from employees e, departments d, locations l
where e.department_id=d.department_id and
d.location_id = l.location_id and
d.location_id = l.location_id and
e.last_name like 'urman') and
e.salary >= 6000 and
e.salary <= 8000;

nomer 8

select *from employees e, departments d, locations l
where e.department_id=d.department_id and
d.location_id = l.location_id and
d.location_id = l.location_id and
e.job_id like '%account' and
e.hire_date > '1995' and
l.state_province = (select l.state_province from employees e, departments d, locations l
where e.department_id=d.department_id and
d.location_id = l.location_id and
d.location_id = l.location_id and
e.last_name like 'chen');

No comments:

Post a Comment