You are on page 1of 2

* Empleados que ganan ms que el promedio de salario de su departamento.

* Empleados contratados en el ao 1994.



* Mostrar el nmero de empleados, el apellido, el salario, el salario aumentado en un 15,5%
slo para los empleados que ganan menos de 10000 y una columna con el monto
aumentado(Incremento).

Seleccionar first_name, last_name, department_name.
select first_name, last_name, department_name from hr.employees e join
hr.departments d on e.department_id = d.department_id

Seleccionar la cantidad de empleados por departamento.
select count(employee_id),department_name from hr.employees e join hr.departments d
on e.department_id = d.department_id group by (d.department_name)

Cantidad de empleados por ciudad.
select count(employee_id),city from (hr.employees e join hr.departments d on
e.department_id = d.department_id) join hr.locations l on d.location_id = l.location_id
group by (l.city)

Cantidad de departamentos por pas.
select count(department_id),country_name from (hr.departments d join hr.locations l on
d.location_id = l.location_id) join hr.countries c on l.country_id = c.country_id group
by (c.country_name)
Muestra la cantidad de empleados por regin
select count(employee_id),region_name from(((hr.employees e join hr.departments d on
e.department_id = d.department_id)join hr.locations l on d.location_id =
l.location_id)joinhr.countries c on l.country_id = c.country_id) joinhr.regions r on
c.region_id = r.region_id group by (r.region_name) Muestra la cantidad de empleados
por pas select count(employee_id),country_name from(((hr.employees e join
hr.departments d on e.department_id = d.department_id)join hr.locations l on
d.location_id = l.location_id)joinhr.countries c on l.country_id = c.country_id)
joinhr.regions r on c.region_id = r.region_id group by (c.country_name)
Cantidad de empleados por pas y por regin
select region_name,country_name,count(employee_id)from
(((hr.employees e join hr.departments d on e.department_id = d.department_id)join
hr.locations l on d.location_id = l.location_id)join
hr.countries c on l.country_id = c.country_id) join
hr.regions r on c.region_id = r.region_id group by (c.country_name,r.region_name)

You might also like