就像标题说的那样,这是我的代码:
SELECT material, SUM([Amount]) AS [Amount], RIGHT(CONVERT(varchar(50), [date_in], 106), 8) FROM [rec_stats] GROUP BY material, RIGHT(CONVERT(varchar(50), [date_in], 106), 8) ORDER BY material,date_in
由于date_in导致代码无法运行,是否有解决方法?
应用另一个聚合,怎么样?
order by min([date_in])