我不确定在下面的SQL查询中应该写些什么来显示“日期”列,例如:“ month-year”-“ 9-2011”。
SELECT MONTH(date) + '.' + YEAR(date) AS Mjesec, SUM(marketingExpense) AS SumaMarketing, SUM(revenue) AS SumaZarada
FROM [Order]
WHERE (idCustomer = 1) AND (date BETWEEN '2001-11-3' AND '2011-11-3')
GROUP BY MONTH(date), YEAR(date)
因此,我要做的是将第一列中的数据更改为显示月份和年份,而不是仅显示月份。