Assignment - 2 - Single Row Function
Assignment - 2 - Single Row Function
1. Display the names, jobs and bonus for all employees assuming all managers get a
bonus of Rs. 500, clerks get Rs.200 and all others except the president Rs.350. the
president gets 20 percent of his salary as bonus.
2. Display the names of all employees and their bonus. Assume each employee gets
a bonus of 20 percent of his salary subject to the maximum of Rs. 200.
3. Display the employee details in the following manner. „Miller joined on the
twenty-third of January of the year eighty second‟
4. Display the name of all employees, and „Greater‟ or „smaller‟ depending on
where the salary of the employees is greater than or less than 1500.
5. Display the DA of all employees and calculation is in the following manner
If salary >=5000 then DA is 75% of Salary
If salary >=3000 and salary<5000 then DA is 60% of Salary Else DA
is 50% of Salary.
6. Display the names, job and hire date of employees with there hire dates in desc
order inside each department.
7. What would be the date after two months?
8. List the employee number, name of all employees Employee names should have
only the first letter in upper case and department no in descending order.
9. Concatenate the name of the person with his job separated by three spaces
(CONCAT).
10. Display the names of all employees, padding them to the right up to 16 characters
with.
11. Show the first three characters of names of all employees.
12. Find the salary of all employees rounding it to the nearest Rs.1000.
13. Find employees name and job whose employees names last character is equal to
jobs last character.
14. Display the names and salary of the employees in the descending order of their
income.
15. Display the names of all employees with any „A‟ at any place of the name.
16. Show all employees who were hired in the first half of the month (Before the 16th
of the month).
17. Show all employees, and indicate with “YES” or “NO” whether they receive a
commission.
18. Show those employees that have a name starting with J, K, L, or M.
19. Display the length of all employees.
20. Display the name and job of all employees who do not have a manager.
21. Find all employees whose name are 5 characters long and end with „N‟.
22. Display the employee name and department no of all employees in department
10,30 in alphabetical order by name.
23. Find employees who do not receive a commission or whose commission is less
than Rs.100. (comm. Is null or comm. < 100)
24. Find the employees whose commission is Rs.0.