Exercise-5 Restricting and Sorting Data
Exercise-5 Restricting and Sorting Data
1). Create a query to display the name and salary of employees earning more than 1500.
2). Create a query to display employee name and department no for employee no 7839.
3). Create a query to display the employee name and salary of each employees whose
salary is not in range of 1400 and 3000.
4). Create a query to display employee name, birthdate and salary of all employees
whose birth year is 82.
5). Create a query to display employee name, job and hire date of employee who are
hired between February 20, 2004 and Sept 11, 2009.
6). Create a query to display the employee name and department no of all employees
who are working in department either 10 or 30 and display alphabetical order of their
name.
7). Create a query to list the employee name, salary and department no of employee
who earn in range of 1000 and 2000 and working in department 20 or 30. Label the
columns Employee, Monthly Salary and Working In respectively. Highest paid employee
should display first if more than 1 employee have same salary then sort the data based
on ascending order of name.
8). Display the employee name and hire date of each employee who was hired in 2003
and working as a Manager.
9). Display the employee name, job & salary each employee who do not have a manager.
10). Display the employee name, salary and commission for employee who are eligible
for commission. Sort data in descending order of salary and commissions.
11). Display the employee name, job and salary of all employee who’s the third letter of
the name is “R”.
12). Display the name of all employees who have “S” and an “E” in their name.
13). Display the employee name, job and Salary for all employees whose job is either
SALESMAN or CLERK and whose salary is not equal to 1100,1250 or 1600. Highest paid
employee should be displayed first.
14). Display employee name, Salary and commission of all employee whose commission
amount is <=500.
15). Create a query to display employee name, job, salary and commission for all
employees who are doing job as a SALESMAN or MANAGER and sort column
commission in which null should be displayed at last.
17. Write a query to find all students who are using email of GMAIL.
18. Write a query to find name and college of all students whose college name ends with
“_UNI”
19. Write a query to find name, city, per and email of all students who are living in
“RAJKOT” and using email of gmail and whose percentage start with 45% and ends
with “MARKS”
20. Write a query to display name and birthdate of all students who are born in 84 and
their name contains “S”.