SQL> SELECT EXTRACT(MONTH FROM hiredate) AS month, COUNT(*) AS num_employees FROM emp WHERE EXTRACT(YEAR FROM hiredate) = 1981 GROUP BY EXTRACT(MONTH FROM hiredate) ORDER BY month;
该SQL查询用于统计1981年每个月新入职员工的数量。
SQL> SELECT EXTRACT(MONTH FROM hiredate) AS month, COUNT(*) AS num_employees FROM emp WHERE EXTRACT(YEAR FROM hiredate) = 1981 GROUP BY EXTRACT(MONTH FROM hiredate) ORDER BY month;
该SQL查询用于统计1981年每个月新入职员工的数量。