DATABASE ASSIGNMENT-4
Q1. Write a query to display employee names in uppercase.
SOL:
Q2. Write a query to get the year for each employee was hired.
SOL:
Q3. Write a query to display salaries with a comma separator (e.g., 88,000.00 instead of
88000.00).
SOL:
Q4. Write a query to mask employee email addresses, showing only the domain.
SOL:
Q5. Write a query to display only the last four digits of employees' phone numbers.
SOL:
Q6. Write a query to display the length of each employee's full name.
SOL:
Q7. Write a query to find employees hired before the year 1989.
SOL:
Q8. Write a query to round employee salaries to the nearest thousand.
SOL:
Q9. Write a query to display the hire date in ‘Monday, June 23, 2015’ format.
SOL:
Q10. Write a query to update the portion of the phone_number in the employees table,
within the phone number the substring '124' will be replaced by '999'.
SOL:
Q11.Write a query to get the details of the employees where the length of the first name
greater than or equal to 8.
SOL:
Q12. Write a query to display leading zeros before maximum and minimum salary.
SOL:
Q13. Write a query to append '@example.com' to email field.
SOL:
Q14. Write a query to get the employee id, first name and hire month
SOL:
.
Q15. Write a query to get the employee id, email id (discard the last three characters).
SOL:
Q16. Write a query to find all employees where first names are in upper case.
SOL:
Q17. Write a query to extract the last 4 character of phone numbers.
SOL:
Q18. Write a query to get the last word of the street address.
SOL: