更新时间:2022-03-16 01:13:06
尝试如下
try like below
select max(degree), Format(date1, "mmm")
from table1
group by Format(date1, "mmm")
SELECT
DATEADD(month, DATEDIFF(month, 0, t.Date1), 0) AS Date1
, MAX(degree) AS MaxDegree
FROM
table1 t
WHERE
YEAR(t.Date1) IN (2014)
GROUP BY
DATEADD(month, DATEDIFF(month, 0, t.Date1), 0)