[go: up one dir, main page]

0% found this document useful (0 votes)
54 views2 pages

Payroll Calculation

The document outlines tasks for an HR employee to analyze performance and calculate salaries. It includes creating employee and department tables, inserting values, creating a view, writing queries to display employee names if their salaries are greater in one table vs another, changing delimiters, and creating stored procedures to retrieve employee data based on salary amounts, including one with a parameter to order results by descending salary.

Uploaded by

ajay.choudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views2 pages

Payroll Calculation

The document outlines tasks for an HR employee to analyze performance and calculate salaries. It includes creating employee and department tables, inserting values, creating a view, writing queries to display employee names if their salaries are greater in one table vs another, changing delimiters, and creating stored procedures to retrieve employee data based on salary amounts, including one with a parameter to order results by descending salary.

Uploaded by

ajay.choudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Payroll Calculation

Description
An HR of the company wants to analyze the performance of the employees and
calculate their salary.

Objective:
The database design helps to retrieve the employees’ details based on certain
criteria which are listed below.

Tasks to be performed:
1. Write a query to create an employee table and a department table.

2. Write a query to insert values in the employee and department tables.

3. Write a query to create a view of the employee and department tables.


4. Write a query to display first name and last name of the employees from
the employee table and an SQL basics view table if the employee’s salary in
the SQL basics table is greater than the salary in the employee table.

5. Write a query to change the delimiter to //.

6. Write a query to create a stored procedure using an employee table if the


salary is greater than or equal to 250000.

7. Write a query to execute the stored procedure.

8. Write a query to create a stored procedure with one parameter using


ORDER BY salary in descending order, and execute the stored procedure.

You might also like