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. From the following table, write a SQL query to find those employees who do not earn any commission.Return full name (first and last name), and salary.
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: From the following table, write a SQL query to find those employees whose salary is in the range of 8000, 12000 (Begin and end values are included.) and get some commission. These employees have joined before ‘1987-06-05’ and not included in the department number 40, 120 and 70. Return all fields.
Next: From the following table, write a SQL query to find those employees whose salary is in the range 9000,17000 (Begin and end values are included). Return full name, contact details and salary.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
SQL: Tips of the Day
MySQL export schema without data
mysqldump -h yourhostnameorIP -u root -p --no-data dbname > schema.sql
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework