我想获得最近 3 个月的结果。这就是我到目前为止所创造的:
SELECT
year([date]) as tahun,
month([date]) as bulan,
[type] as tipe,
SUM([net qty]) total_karton,
CAST(SUM([cm1 (rp)]) as decimal) as total_uang
FROM
tbl_weeklyflash_ID
GROUP BY
year([date]),
month([date]),
[type]
ORDER BY
month([date]), [type]
但是该查询显示所有月份,如何仅获取最近的 3 个月?