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.
9 lines
637 B
MySQL
9 lines
637 B
MySQL
5 years ago
|
/*18. Write a query in SQL to display the full name (first name and last name), hire date, commission percentage, and
|
||
|
telephone separated by '-', and salary for those employees who earn the salary above 11000 or the seventh digit in their
|
||
|
phone number equals 3 and make the result set in a descending order by the first name. */
|
||
|
SELECT first_name ||' '||last_name AS Full_Name, hire_date ,
|
||
|
commission_pct, email ||' - '||phone_number AS Contact_Details, salary
|
||
|
FROM employees
|
||
|
WHERE salary > 11000
|
||
|
OR phone_number LIKE '______3%'
|
||
|
ORDER BY first_name DESC;
|