Task 14
Display the employee name, salary of all employees whose condition of salary is entered by user. Sort
the data in descending order according to the salary.
LAB#5
1. Write a query to display the current date.
2. For each employee, display the employee ID number, employee name, salary and salary
increased by 15% and expressed as whole number. Label the column NewSalary.
3. Modify the above query to add a column that subtracts the old salary from the new
salary. Label the Column Increase.
4. Write a query that displays the employee’s names with the first letter capitalize and all
other letters lowercase and length of the names, for all employees whose name start
with J, A or M. Give each column an appropriate label. Sort the results by employees’
name.
5. For each employee, display the employee name and calculate the number of months
between today and a day the employee was hired. Label the column
MONTHS_WORKED. Order your results by the number of months employed. Round
the number of results up to closest whole number.
6. Write a query that produces the following for each employee:
<Employee name> earns <salary>monthly but wants <3 times salary>. Label the
column Dream Salaries.
7. Create a query to display the employee name and salary of all employees. Format the
salary to be 15 characters long, left-padded with $. Label the column SALARY.
8. Display each employee name, hiredate and salary review date, which is the first
Monday after six months of service. Label the column REVIEW. Format the dates to
appear similar to “Monday, the Thirty-first of July, 2000”.
9. Display the employee name, hiredate, and day of the week on which the employee
started. Label the column DAY. Order the results by the day started with Monday.
10. Create a query that displays the employees’ names and indicates the amounts of their
salaries through asterisks. Each asterisk signifies a hundred dollars. Sort the data in
descending order of salary. Label the column
EMPLOYEE_AND_THEIR_SALARIES.2
LAB #6