0% found this document useful (0 votes)
15 views

SQL Task list

Uploaded by

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

SQL Task list

Uploaded by

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

Assignment-1

Q-1. Write an SQL query to fetch “FIRST_NAME” from Worker table using the alias
name as <WORKER_NAME>.

Q-2. Write an SQL query to fetch unique values of DEPARTMENT from Worker table.

Q-3. Write an SQL query to show the last 5 record from a table.

Assignment-2
Q-1. Write an SQL query to print the first three characters of FIRST_NAME from Worker
table.

Q-2. Write an SQL query to find the position of the alphabet (‘a’) in the first name
column ‘Amitabh’ from Worker table.

Q-3. Write an SQL query to print the name of employees having the highest salary in each
department.

Assignment-3
Q-1. Write an SQL query to print the FIRST_NAME from Worker table after removing
white spaces from the right side.

Q-2. Write an SQL query that fetches the unique values of DEPARTMENT from Worker
table and prints its length.

Q-3. Write an SQL query to fetch nth max salaries from a table.

Assignment-4
Q-1. Write an SQL query to print the FIRST_NAME from Worker table after replacing ‘a’
with ‘A’.

Q-2. Write an SQL query to print all Worker details from the Worker table order by
FIRST_NAME Ascending and DEPARTMENT Descending.

Q-3. Write an SQL query to fetch the names of workers who earn the highest salary.
Assignment-5
Q-1. Write an SQL query to print details of workers excluding first names, “Vipul” and
“Satish” from Worker table.

Q-2. Write an SQL query to print details of the Workers whose FIRST_NAME ends with
‘h’ and contains six alphabets.

Q-3. Write a query to validate Email of Employee.

Assignment-6
Q-1. Write an SQL query to print details of the Workers who have joined in Feb’2014.

Q-2. Write an SQL query to fetch duplicate records having matching data in some fields of
a table.

Q-3. How to remove duplicate rows from Employees table.

Assignment-7
Q-13. Write an SQL query to show only odd rows from a table.

Q-14. Write an SQL query to clone a new table from another table.

Assignment-8
Q-15. Write an SQL query to fetch intersecting records of two tables.

Q-16. Write an SQL query to show records from one table that another table does not have

Assignment-9
Q-17. Write an SQL query to show the top n (say 10) records of a table.
Q-18. Write an SQL query to determine the nth (say n=5) highest salary from a table.

Assignment-10
Q-19. Write an SQL query to determine the 5th highest salary without using TOP or limit
method.

Q-20. Write an SQL query to fetch the list of employees with the same salary.

You might also like