in account table
account type amount
ac1 credit 300
ac2 debit 5000
ac3 credit 3000
ac1 debit 4000
ac3 debit 2000
ac2 credit 4000
write a query how to get sum of credit & sum of debit

Answer Posted / sanjay

select type,sum(amount)from account table group by type

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How are extents allocated to a segment?

586


What is the difference between a user and a schema in oracle?

568


What is a connect identifier?

545


What is a proxy class?

568


ABOUT IDENTITY?

1567






What is a trigger and what are its types?

621


I have some query regarding Report generation from Oracle Apps "PO module". I have to generate a report where table columns are as below: Vendor_name Invoice No PO Number Item_Quantity Value of Goods Date of Shipping Name_of_the_transport Date_of_receipt_issued. Now my questions is :from which table/column I can get the information of "Name_of_the_transport" column. Thanks in advance.

2895


What is coalesce function?

581


What is not equal to in oracle?

536


How many file formats are supported to export data?

665


What is the usage of control file in oracle?

613


How to use values from other tables in update statements using oracle?

574


What is a snapshot in oracle database?

586


Is there a combination of "like" and "in" in sql?

592


Why is oracle database so popular?

571