Professional Documents
Culture Documents
2023368399
Select the ID, last name combines with the first name and salary for all the employees that have
ST_MAN as their job.
SQL: SELECT employee_id AS ID, CONCAT(CONCAT(last_name, ' '), first_name) AS full_name, salary
FROM employees
Ques�on 2 Do the SQL that displays the first 8 characters of employee’s last names and indicates their
salary with #. Each # represents two thousand dollars. Sort the salary in ascending order.
FROM employees
ORDER BY salary;
Ques�on 3 By using sub string function, find the department’s name that ends with ‘ng’.
SQL: SELECT department_name
FROM departments
Ques�on 4 Find the length of employees’ first name that have been work more than 5 years in the
company.
FROM employees
Ques�on 5 Find the number of months of working for each employee in department 80.
SQL: SELECT employee_id, first_name, last_name, ROUND(MONTHS_BETWEEN(SYSDATE, hire_date),
2) AS months_worked
FROM employees