我可以在此查询中输出月份名称而不是月份数字吗?
SELECT
YEAR(Periodo) AS year,
MONTH(Periodo) AS month,
SUM(Paid) AS paid
FROM
affitto_sa
GROUP BY
YEAR(Periodo),
MONTH(Periodo)
答案 0 :(得分:2)
SELECT
YEAR(Periodo) AS year,
Datename(month, Periodo) AS month,
SUM(Paid) AS paid
FROM
affitto_sa
GROUP BY
YEAR(Periodo),
MONTH(Periodo)