SQL SORTING and FILTERING on HR Database: Display the first and last name, and salary for those employees whose first name is ending with the letter m
SQL SORTING and FILTERING on HR Database: Exercise-10 with Solution
10. Write a query in SQL to display the first and last name, and salary for those employees whose first name is ending with the letter m.
Sample table : employees
SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m';
first_name | last_name | salary ------------+-----------+--------- Adam | Fripp | 8200.00 Payam | Kaufling | 7900.00 William | Smith | 7400.00 William | Gietz | 8300.00 (4 rows)
Contribute your code and comments through Disqus.
Previous: Write a query in SQL to display the full name (first and last), the phone number and email separated by hyphen, and salary, for those employees whose salary is within the range of 9000 and 17000. The column headings assign with Full_Name, Contact_Details and Remuneration respectively.
Next: Write a query in SQL to display the full name (first and last) name, and salary, for all employees whose salary is out of the range 7000 and 15000 and make the result set in ascending order by the full name.
What is the difficulty level of this exercise?