You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
459 B
MySQL
8 lines
459 B
MySQL
5 years ago
|
/*7. 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.*/
|
||
|
SELECT *
|
||
|
FROM employees
|
||
|
WHERE salary BETWEEN 8000 AND 12000
|
||
|
AND commission_pct IS NOT NULL
|
||
|
OR department_id NOT IN (40 , 120 , 70)
|
||
|
AND hire_date < '1987-06-05'
|