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

Answers were Sorted based on User's Feedback



acname actype amount ac1 credit 300 ac2 credit 4000 ac1 debit 4000 ac2 debit ..

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

acname actype amount ac1 credit 300 ac2 credit 4000 ac1 debit 4000 ac2 debit ..

Answer / amit kumar

select sum(amount) amt , acname, actype from table group by
acname , actype

Is This Answer Correct ?    6 Yes 2 No

Post New Answer

More Oracle General Interview Questions

How to drop a stored procedure in oracle?

0 Answers  


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

0 Answers  


What is a table in oracle?

0 Answers  


What is the maximum limit on the number of columns in a table?

0 Answers  


What are the original export and import utilities?

0 Answers  


I creat Credit memo in AR. Now i want revers the Credit Memo.how you can revers that what out any aditional entry.

0 Answers   GTL,


Write a syntax for update query in oracle?

0 Answers  


How to use an explicit cursor without open statements?

0 Answers  


How to export data to a csv file?

0 Answers  


Explain parameter file in oracle.

0 Answers  


Anybody can tell me, how do we find second largest emp salary from emp table.. Thanks in advance ...

10 Answers   Cognizant, ID, NTTF Nettur Technical Training Foundation, Sony, Verizon,


How do I limit the number of oracle database connections generated by weblogic server?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)