Oracle: List the names, salary of all the employees who are working with a commission package
Oracle Operator: Exercise-8 with Solution
Write a query to list the names, salary of all the employees who are working with a commission package.
Sample table : employees
Sample Solution :-
Oracle Code :
SELECT EMPLOYEE_ID,COMMISSION_PCT ,SALARY
FROM employees
WHERE commission_pct IS NOT NULL;
Output:
EMPLOYEE_ID COMMISSION_PCT SALARY
----------- -------------- ----------
145 .4 14000
146 .3 13500
147 .3 12000
148 .3 11000
149 .2 10500
150 .3 10000
151 .25 9500
152 .25 9000
153 .2 8000
154 .2 7500
155 .15 7000
156 .35 10000
157 .35 9500
158 .35 9000
159 .3 8000
160 .3 7500
161 .25 7000
162 .25 10500
163 .15 9500
164 .1 7200
165 .1 6800
166 .1 6400
167 .1 6200
168 .25 11500
169 .2 10000
170 .2 9600
171 .15 7400
172 .15 7300
173 .1 6100
174 .3 11000
175 .25 8800
176 .2 8600
177 .2 8400
178 .15 7000
179 .1 6200
35 rows selected.
Pictorial Presentation:

Go to:
PREV : Write a query to list the name of all the employees who are working as accountant in finance section and drawing a salary is greater than equal to $5000 and less than equal to $20000.
NEXT : Write a query to list the name, salary of all the employees where employee first name belongs in a specified list.
Improve this sample solution and post your code through Disqus.
What is the difficulty level of this exercise?
