SQL SORTING and FILTERING on HR Database: Display the full name, and salary for all employees who does not earn any commission
SQL SORTING and FILTERING on HR Database: Exercise-8 with Solution
8. Write a query in SQL to display the full name (first and last name), and salary for all employees who does not earn any commission.
Sample table : employees
SELECT first_name ||' '||last_name AS Full_Name, salary FROM employees WHERE commission_pct IS NULL;
full_name | salary -----------+-------- (0 rows)
N.B.: In certain instances not null is removed in table structure, so results may vary.
Contribute your code and comments through Disqus.
Previous: Write a query in SQL to display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number is except the number 40, 120 and 70 and they have been hired before June 5th, 1987.
Next: 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.
What is the difficulty level of this exercise?