📜  根据月份名称和计数获取sql中的记录 - SQL代码示例

📅  最后修改于: 2022-03-11 15:05:20.796000             🧑  作者: Mango

代码示例1
SELECT EXTRACT(month FROM dateofappointment) "Month", count(*)
FROM appointment
WHERE EXTRACT(YEAR FROM dateofappointment) = '2014'
GROUP BY EXTRACT(month FROM dateofappointment)
ORDER BY EXTRACT(month FROM dateofappointment);