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 |
WHEN CURSOR MOVES FROM ONE FORM TO ANOTHER FORM, HOW MANY TRIGGER WILL BE FIRED AND WHAT ARE THEIR SEQUENCE?
What is oracle database client?
Point out the difference between user tables and data dictionary?
How to write a query with a right outer join in oracle?
How to test null values?
How can I convert single byte kana characters into multi byte kana characters and vice-versa.
What is ceil and floor in oracle?
How many types of auditing in Oracle?
How to drop a stored procedure in oracle?
What is procedure overloading in oracle?
How to create DSN..Explain?
2 Answers Accenture, BeBo Technologies, Infosys,
How to insert a new row into a table in oracle?