I have data dozens and pcs.
I want to add those pcs >=12 into dozens, and remain pcs < 12.
Below is my code, but failed to achieve it.
SUM(QtyLsn) + FLOOR(CAST(SUM(QtyPcs)/12 AS MONEY)) AS QtyLsn
, SUM(QtyPcs) - FLOOR(CAST(SUM(QtyPcs)/12 AS MONEY)) AS QtyPcs
How could I do it ?