items cost totalamountabc 100 1000pqr 200 2000abc 100 4000def 300 3000abc 100 3000
SELECT items,cost, SUM(totalamount) as TotalAmountFROM TableName GROUP BY items, cost
Mark This Response as Answer -- Chandu http://www.dotnetfunda.com/images/dnfmvp.gif
select * from orders;
ITEM COST TOTALAMOUNT---------- ---------- -----------abc 100 1000cde 200 2000abc 100 4000bjh 200 5000
SQL> SELECT ITEM,COST,TOTALAMOUNT FROM ORDERS 2 UNION ALL 3 SELECT NULL,NULL,SUM(TOTALAMOUNT) FROM ORDERS;
ITEM COST TOTALAMOUNT---------- ---------- -----------abc 100 1000cde 200 2000abc 100 4000bjh 200 5000 12000
rajesh.plsql123@gmail.com
Login to post response