Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is primefaces used for?

1049


State the difference between a primary key and foreign key?

935


How to declare a local variable?

1115


What are the set operators union, union all, minus & intersect meant to do?

988


What are the different pseudo commands? Explain in general?

1080


What are data pump export and import modes?

1068


What operating systems are supported by oracle database 10g xe?

1034


Why use resource manager in Oracle?

1105


What is where clause in oracle?

1031


what is the use of system.effective.date variable in oracle?

1116


What are the uses of Database Trigger ?

1720


How to delete multiple rows from a table in oracle?

1060


What is oracle rownum?

952


Can we commit inside a function in oracle?

964


What is the usage of save points in oracle database?

964