SQL Revision 1
SQL Revision 1
SQL Revision 1
1) Write an SQL query to fetch “FIRST_NAME” from the Worker table using the alias name
<WORKER_NAME>
2) Write an SQL query to fetch “FIRST_NAME” from the Worker table in upper case.
3) Write an SQL query to fetch unique values of DEPARTMENT from the Worker table
4) Write an SQL query to print the first three characters of FIRST_NAME from the Worker table
5) Write an SQL query to print all Worker details from the Worker table order by FIRST_NAME
Ascending.
6) Write an SQL query to print all Worker details from the Worker table order by FIRST_NAME
Ascending and DEPARTMENT Descending
7) Write an SQL query to print details for Workers with the first names “Vipul” and “Satish”
from the Worker table.
8) Write an SQL query to print details of workers excluding first names, “Vipul” and “Satish”
from the Worker table.
9) Write an SQL query to print details of Workers with DEPARTMENT name as “Admin”.
10) Write an SQL query to print details of the Workers whose FIRST_NAME contains ‘a’.
11) Write an SQL query to print details of the Workers whose FIRST_NAME ends with ‘a’.
12) Write an SQL query to print details of the Workers whose SALARY lies between 100000 and
500000.
13) Write an SQL query to print details of the Workers who joined in Feb’2014.
14) Write an SQL query to fetch the count of employees working in the department ‘Admin’.
15) Write an SQL query to fetch worker names with salaries >= 50000 and <= 100000.
16) Write an SQL query to fetch the no. of workers for each department in descending order
17) Write an SQL query to print details of the Workers who are also Managers