我想对行进行分组并将它们移动到同一张表中的新列中。这是我的例证:
这是我到目前为止所做的查询:
SELECT
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
WHERE
DATEDIFF(month,[date],CURRENT_TIMESTAMP) between 0 and 2
GROUP BY
month([date]),
[type]
ORDER BY
month([date]), [type]
怎么做?