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 |
How to drop a stored procedure in oracle?
How do I use unicode codesets with the weblogic jdriver for oracle driver?
What is a table in oracle?
What is the maximum limit on the number of columns in a table?
What are the original export and import utilities?
I creat Credit memo in AR. Now i want revers the Credit Memo.how you can revers that what out any aditional entry.
Write a syntax for update query in oracle?
How to use an explicit cursor without open statements?
How to export data to a csv file?
Explain parameter file in oracle.
Anybody can tell me, how do we find second largest emp salary from emp table.. Thanks in advance ...
10 Answers Cognizant, ID, NTTF Nettur Technical Training Foundation, Sony, Verizon,
How do I limit the number of oracle database connections generated by weblogic server?