>+--------+-----------+---------+--------+----+ >| Art. | Descrip. | Pr.Unit | Quant. |Tax | >+--------+-----------+---------+--------+----+ > 00001 ABC 12.23 2 1 > 00002 CDS 9.33 1 3 > 00003 C1 2.99 1 2 > 00004 C2 1.44 2 1 > 00005 C3 2.23 1 3 >+--------+-----------+---------+--------+-----+ >>My question is, how can i group the (Pr.Unit*Quant)*TAX/100 for TAX 1,2,3.. and the Total Value for all TAX 1,2,3,4....
select Tax, Pr_Unit * Quant as Total; from MyTable; group by Tax; into cursor Temp