with fbirthdayreps(fbirthday,yearcount) as
( select fBirthday COUNT(*)
FROM t_PALM_Employees AS fbirthday
WHERE fBirthday IS NOT NULL
GROUP BY YEAR
)
SELECT fbirthday,yearcount
FROM fbirthdayreps
注明:fBirthday是表中 t_PALM_Employees的生日列!
提示我有错,我又不知道错在哪,TKS!
------解决思路----------------------
语法错了,稍等给你写一个
------解决思路----------------------
with fbirthdayreps(fbirthday,yearcount) as这错误多如牛毛,大概猜了一个
( select YEAR(fBirthday),COUNT(*)
FROM t_PALM_Employees
WHERE fBirthday IS NOT NULL
GROUP BY YEAR(fBirthday)
)
SELECT fbirthday,yearcount
FROM fbirthdayreps
要不你把原始表结构给我们看下