Skip to content

SQL Assignment ‐ 2

Sayan Bhattacharya edited this page Nov 30, 2025 · 8 revisions

1. Display the first name and last name of all employees in uppercase.

image

2.Display the first name of all employees in lowercase.

image

3.Display the first name and last name using INITCAP (capitalize first letter only).

image

4.Display the first name and its length.

image

5. Display the first name and show only the first three characters

image

6.Display the first name and the position of the letter ‘a’ in it

image

7.Display the first name and replace all occurrences of ‘a’ with ‘@’

image

8.Display the first name right-padded with * up to 15 characters

image

9.Display the first name left-padded with # up to 20 characters

image

10. Display the first name and last name concatenated as Full_Name

image

11.Display the employee name, salary, and the rounded salary to the nearest thousand

image

12.Display the employee name, salary, and the truncated salary to the nearest hundred

image

13.Display the employee name and salary raised to power 2.

image

14.Display the employee name and salary after adding 500 bonus

image

15.Display the employee name, commission_pct, and the total pay

image

16.Display the employee name and their hire date in the format DD-MON-YYYY

image

17.Display the employee name, hire_date, and next Monday after hire_date

image

18.Display the employee name, hire_date, and last day of the hire month

image

19.Display the employee name and the number of months worked till today

20.Display the employee name and the hire year

image

21.Display the employee name and hire_date + 30 days using date arithmetic.

image

22.Display the employee name, hire_date, and add 6 months to hire_date using ADD_MONTHS.

image

23.Display the employee name and the day name (e.g., Monday, Tuesday) of their hire_date

image

Clone this wiki locally