acname actype amount
ac1 credit 300
ac2 credit 4000
ac1 debit 4000
ac2 debit 455
ac1 credit 500
how to get sum of credit and sum of debit for each account
Answers were Sorted based on User's Feedback
Answer / terence
select
acname,
sum(decode(actype,'credit',amount,0)) Credit,
sum(decode(actype,'debit',amount,0)) Debit
from account_table
group by acname
Is This Answer Correct ? | 11 Yes | 1 No |
Answer / amit kumar
select sum(amount) amt , acname, actype from table group by
acname , actype
Is This Answer Correct ? | 6 Yes | 2 No |
What is a recycle bin in oracle?
Explain the use of record option in exp command.
which is best insttute for teradata,sybase,mysql,oracle in hyderabad
How to execute the package in oracle?
11. Display the client number and name and the client number and name of the person who referred that client.
How to use "in" parameter properly?
What is bind variable in oracle 11g?
How can we Update a table with out using UPDATE command?
What is hash cluster in oracle?
What is data file?
Explain index?
How to create an oracle database?