The document contains a series of SQL queries aimed at manipulating and retrieving data from an 'employees' table. Queries include updating phone numbers, filtering employees based on name length, formatting salary outputs, and extracting specific parts of employee information. It also covers tasks such as appending email domains, finding employees with uppercase names, and sorting results based on various criteria.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views1 page
8_Function_string
The document contains a series of SQL queries aimed at manipulating and retrieving data from an 'employees' table. Queries include updating phone numbers, filtering employees based on name length, formatting salary outputs, and extracting specific parts of employee information. It also covers tasks such as appending email domains, finding employees with uppercase names, and sorting results based on various criteria.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
2.
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'. 3. Write a query to get the details of the employees where the length of the first name greater than or equal to 8. 4. Write a query to display leading zeros before maximum and minimum salary. 5. Write a query to append '@example.com' to email field. 6. Write a query to get the employee id, first name and hire month. 7. Write a query to get the employee id, email id (discard the last three characters). 8. Write a query to find all employees where first names are in upper case. 9. Write a query to extract the last 4 character of phone numbers. 10. Write a query to get the last word of the street address. 11. Write a query to get the locations that have minimum street length. 12. Write a query to display the first word from those job titles which contains more than one words. 13. Write a query to display the length of first name for employees where last name contains character 'c' after 2nd position. 14. Write a query that displays the first name and the length of the first name for all employees whose name starts with the letters 'A', 'J' or 'M'. Give each column an appropriate label. Sort the results by the employees' first names. 15. Write a query to display the first name and salary for all employees. Format the salary to be 10 characters long, left-padded with the $ symbol. Label the column SALARY. 16. Write a query to display the first eight characters of the employees' first names and indicates the amounts of their salaries with '$' sign. Each '$' sign signifies a thousand dollars. Sort the data in descending order of salary. 17. Write a query to display the employees with their code, first name, last name and hire date who hired either on seventh day of any month or seventh month in any year.