Date Qty Unit Rate Amount 2013-04-02 00:00:00.000 1 PCS 200.00 200.00 2013-04-02 00:00:00.000 2 PCS 230.00 460.00 2013-04-02 00:00:00.000 3 PCS 200.00 600.00 2013-04-02 00:00:00.000 320 PCS 178.00 56960.00 2013-04-02 00:00:00.000 360 PCS 118.00 42480.00 2013-04-03 00:00:00.000 360 PCS 142.00 51120.00 2013-04-03 00:00:00.000 360 PCS 178.00 64080.00 2013-04-03 00:00:00.000 480 PCS 116.00 55680.00 2013-04-04 00:00:00.000 480 PCS 134.00 64320.00 2013-04-04 00:00:00.000 520 PCS 132.00 68640.00
select date, sum(qty), unit, avg(rate), sum(amount) from yourtable group by date, unit
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)