Practical Testing Question_Only_Data Analyst
Practical Testing Question_Only_Data Analyst
Below are table list which are included HR schema for organization.
1. JOB_HISTORY
Employee_id number(6)
Start_date date
End_date date
Job_id varchar2(10)
Department_idnumber(4)
2. DEPARTMENTS
Department_id number(4)
Department_name varchar2(30)
Manager_id number(6)
Location_id number(4)
3. JOBS
Job_id varchar2(10)
Job_title varchar2(35)
Min_salary number(6)
Max_salary number(6).
4. LOCATIONS
Location_id number(4)
Street_address varchar2(40)
Postal_code varchar2(12)
City varchar2(30)
State_provincevarchar2(25)
Country_id char(2)
5. EMPLOYEES
Employee_id number(6)
First_name varchar2(20)
Last_name varchar2(25)
Email varchar2(25)
Phone_number varchar2(20)
Hire_date date
Job_id varchar2(10)
Salary number (8,2)
Commission_pct number(2,2)
Manager_id number(6)
Department number(4)
6. REGIONS
Region_id number
Region_name varchar2(25)
7. COUNTRIES
Country_id char(2)
Country_name varchar2(40)
Region_id number
Please write query for each question.
1. Find the highest, lowest, sum, and average salary of all employees. Label the columns
Maximum, Minimum, Sum, and Average, respectively. Round your results to the nearest
whole number.
2. Create a report to display the manager number and the salary of the lowest-paid employee
for that manager. Exclude anyone whose manager is not known. Exclude any groups where
the minimum salary is $6,000 or less. Sort the output in descending order of salary.
3. Write a query for the HR department to produce the addresses of all the departments. Use
the LOCATIONS and COUNTRIES tables. Show the location ID, street address, city,
state or province, and country in the output.
4. Write a query that displays the employee number and last name of all employees who
work in a department with any employee whose last name contains the letter “u.”
5. Create a report to display the last name, job ID, and hire date for employees with the last
names of Matos and Taylor. Order the query in ascending order by hire date.
6. Create a report to display the last name, salary, and commission for all employees who
earn commissions. Sort data in descending order of salary and commissions.
7. Create a report that displays the employee number, last name, salary, department number,
and the average salary in their department for all employees.
8. Create the following statistical reports for the HR department. Include the department
number, department name, and the number of employees working in each department.