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
Answer Posted / 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 |
Post New Answer View All Answers
What is transport network substrate (tns) in oracle?
Hi this srilatha. I comlpeted my Oracle-hrms. can u provide me interview questions on Core hr, payroll,sshr,OLM etc..
What is merge in oracle?
What is background process in Oracle?
How to bring a tablespace online?
Explain user account with reference to oracle.
How to export data with a field delimiter?
What are the uses of linked server and explain it in detail?
Explain an index?
What is raw datatype?
Explain oracle instance.
how do u setup a replication site?
How to convert characters to numbers in oracle?
What is open database communication (odbc) in oracle?
How to select some rows from a table in oracle?