Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

sf7.1.

Question 1:

select count(employee_master46.first_name)as "Total Employees" from


mach1.employee_master46,mach1.country_master46, mach1.department_master46,
mach1.location_master46 where employee_master46.department_id =
department_master46.department_id and department_master46.location_id =
location_master46.location_id and location_master46.country_id =
country_master46.country_id and ( country_name = 'United States of America' or
country_name = "Germany");

Question 2:

select count(employee_master46.first_name)as "Total Employees" from


mach1.employee_master46,mach1.country_master46, mach1.department_master46,
mach1.location_master46, mach1.region_master46 where
employee_master46.department_id = department_master46.department_id and
department_master46.location_id = location_master46.location_id and
location_master46.country_id = country_master46.country_id and
country_master46.region_id = region_master46.region_id and
region_master46.region_id = 2;

Question 3:

select count(employee_master46.first_name)as "Total Employees" from


mach1.employee_master46,mach1.country_master46, mach1.department_master46,
mach1.location_master46, mach1.region_master46 where
employee_master46.department_id = department_master46.department_id and
department_master46.location_id = location_master46.location_id and
location_master46.country_id = country_master46.country_id and
country_master46.region_id = region_master46.region_id and
region_master46.region_id = 1;

Question 4:

select count(employee_master46.first_name)as "Total Employees" from


mach1.employee_master46,mach1.country_master46, mach1.department_master46,
mach1.location_master46 where employee_master46.department_id =
department_master46.department_id and department_master46.location_id =
location_master46.location_id and location_master46.country_id =
country_master46.country_id and country_name like "Un%";

Question 5:

7.1.2

Question 1:

select count(location_id) as "Total Departments" from mach1.department_master46


where location_id like "17%";

Question 2:

select department_id, department_name from mach1.department_master46 where


department_id = (select max(department_id) from mach1.department_master46);

Question 3:

select department_name, manager_id from mach1.department_master46 where manager_id


= (select max(manager_id) from mach1.department_master46);

Question 4:

Question 5:

Question 6;
Question 7:

You might also like