Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

SQL Assignment

The document outlines an SQL assignment that requires the creation of two tables, Emp and Dept. It includes a series of queries to perform various tasks such as finding the 3rd highest salary, highest paid employees by department, and employees earning above average salaries, among others. Additionally, it specifies conditions for displaying employee salaries based on ranges and includes tasks for retrieving department-wise salary information.

Uploaded by

ktsweekar11
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

SQL Assignment

The document outlines an SQL assignment that requires the creation of two tables, Emp and Dept. It includes a series of queries to perform various tasks such as finding the 3rd highest salary, highest paid employees by department, and employees earning above average salaries, among others. Additionally, it specifies conditions for displaying employee salaries based on ranges and includes tasks for retrieving department-wise salary information.

Uploaded by

ktsweekar11
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL Assignment

Create below two tables

Emp

Dept

Write queries to

find 3rd highest salary (using Analytical function and without analytical function)
find highest paid employee of each department
find the top 3 salaries (using Analytical function and without analytical function)
find the last 3 rows
find 5th,6th,7th row (using Analytical function and without analytical function)
find the 9th row
find employees of those dept in which more than 2 employees are working
find employees who earns more than the avg. salary of their department
find employees who have no subordinates
if sal>1000 then display thousand , if sal is between 1000 and 2000 then display
2thousnand,
if sal is between 3000 and 4000 then display 3thousand else display above
find the difference between employee's salary and average salary in their department

Find the Deptartment with lowest salary (dept_name,salary)


Find department wise max salary and employee earning max salary.
(dept_name,salary,name)
a)Find department wise min salary (dept_name,salary,name) AND
b)If two employee have same lowest salary fetch one with whose name comes first
alphabetically.
Display name of all employees in Deptartment 'ACCOUNTING', and along with their
salary and the minimum salary of that department, and the minimum salaried person. If
two employee have same lowest salary fetch one with whose name comes first
alphabetically.

You might also like