k224111463 - bùi Thị Hồng Thi (4) - Lab 3
k224111463 - bùi Thị Hồng Thi (4) - Lab 3
k224111463 - bùi Thị Hồng Thi (4) - Lab 3
1. Display employee_id, last_name, salary, salary has been increased by 10% and
rounded and labeled by “New Salary”, increased amount of old salary and new
salary, labeled by “Increased Amount”
Convert, Round
FROM EMPLOYEES;
FROM EMPLOYEES
CASE
END AS SALARY_REVIEW
FROM EMPLOYEES;
5. Write a query toL display employee_id, last_name, commission_pct. If
the employee has no commission_pct, the content is displayed as “With no
commission”, labeled as “Information of Comission”
FROM
EMPLOYEES;
6. Suppose the JOB_ID must always have 10 characters. If a JOB_ID has less
than 10 characters, pad leading *, so that the length of the JOB_ID always has
10 characters. Write a query to display employee_id, last_name, job_id, new
job_id, which always has 10 characters.
FROM EMPLOYEES;
7. Display number of employees joined after 15th of the month.
SELECT COUNT(*)
FROM EMPLOYEES
FROM EMPLOYEES
MIN(), MAX()
FROM EMPLOYEES;
11.Display manager ID and number of employees managed by the manager.
SELECT MANAGER_ID,
FROM EMPLOYEES
GROUP BY MANAGER_ID;