SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT department_id, AVG(TRUNC(MONTHS_BETWEEN(SYSDATE, hire_date) / 12)) AS average_years_of_service FROM employees GROUP BY department_id;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear