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

How do I use unicode codesets with the weblogic jdriver for oracle driver?

1015


Explain what are the different type of segments?

916


what is normalisation?what are its uses?

2213


Respected sir, Please send me technical questions related to oracle apps..

1762


What are the differences between char and varchar2 in oracle?

1076


can u send the sql dumps to sivakumarr1987@gmail.com plz help me

3000


What happens if variable names collide with table/column names?

1108


Explain the use of full option in exp command.

1057


How to insert multiple rows with one insert statement in oracle?

1022


What is private procedure oracle?

958


How to filter out duplications in the returning rows using oracle?

989


How to synchronize 2 schema's objects?

2117


What is an index associated with a constraint?

976


what are steps for interface? where is exchange rate defined in which table?

2061


What are the original export and import utilities?

1060