0% found this document useful (0 votes)
20 views1 page

Xi Ip-worksheet 1 - Basic SQL Query

The document is a worksheet for practicing basic SQL query writing on an 'EMP' table. It includes 20 specific tasks that require writing SQL queries to retrieve and manipulate employee data based on various conditions. The tasks cover displaying employee details, filtering records, and performing calculations on salary data.

Uploaded by

arunadhaven
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)
20 views1 page

Xi Ip-worksheet 1 - Basic SQL Query

The document is a worksheet for practicing basic SQL query writing on an 'EMP' table. It includes 20 specific tasks that require writing SQL queries to retrieve and manipulate employee data based on various conditions. The tasks cover displaying employee details, filtering records, and performing calculations on salary data.

Uploaded by

arunadhaven
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/ 1

PM SHRI KENDRIYA

KENDRIYA VIDYALAYAVIDYALAYA NEPA


39 GTC VARANASI BARAPANI
CANTT.
WORKSHEET 1 - BASIC SQL QUERY WRITING PRACTICE

Write SQL queries to perform the following operations on the above table “EMP” :
Q1. Display employee name and their Date of Birth.
Q2. Display names of all employees along with their annual salary (Salary*12).
While displaying query result, rename EName as Name also rename Salary*12 column as
Annual Salary.
Q3.To display unique department number for all the employees.
Q4.Display all the employees who are earning more than 5000 and work in DeptNO 20.
Q5.Displays records of all the employees except HONEY and PREM.
Q6. Display name and department number of all those employees who are earning salary
between 20000 and 50000 (both values inclusive).
Q7. Display details of all the employees who are working either in Dept No 20 or 30 or 40
Q8. Display details of all those employees who are not getting any salary.
Q9. Display names of all the employees who have been getting some salary.
Q10. Displays details of all those employees whose name starts with 'K'
Q11. Displays details of all those employees whose name ends with 'a'
Q12. Displays names of all the employees containing 'se' as a substring in name
Q13. Displays names of all employees containing 'a' as the second character
Q14. Display name
Increase of youngest
the salary employee.
of all salesmen by 5%.

Q15. Display name


Remove of of
detail eldest employee.
all employees of department no 10.

Q16. Display
Insertname
detail of
of employee getting highest
one more employee. Use anysalary.
data of your choice.

Q17. Display name


Add one of employee
more gettingNO
column AADHAR lowest
in the salary.
above given table

Q18. Display name of employees whose HIRE DATE is not given ( it is unknown / NULL).
Q19. Display name of employees whose name contains exactly 5 characters.
Q20. Display name of clerks who are working in Deptt No 20 .

You might also like