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 to check the server version in oracle?

1100


What are the different types of database objects?

1071


 How to use an oracle sequence generator in a mapping?

1081


What is a database table in oracle?

1027


How to define a data field as not null?

1117


How different is ms access and oracle?

1050


What are the different types of record groups in oracle? Explain each of them

1031


How much memory your 10g xe server is using?

1109


What is a named program unit?

1093


What is index in Oracle?

1080


What is user managed backup in Oracle?

1149


What are the oracle differences between nvl and coalesce

1158


What is an anonymous block?

1262


What is the difference between Delete, Truncate and Drop in Oracle?

1139


Is oracle a programming language?

998