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 / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by cdb and pdb in oracle 12c?

641


How to connect to the server with user account: sys?

568


What are dml statements in oracle?

623


How do I decide when to use right joins/left joins or inner joins or how to determine which table is on which side?

548


Explain how are indexes update?

623






How to define an external table with a text file?

581


What happens if you set the sga too low in oracle?

560


How oracle handles dead locks?

604


What is query image?

587


What is java oracle used for?

530


Differentiate between function and procedure in oracle.

563


What is Java Pool in Oracle?

608


How to pass a parameter to a cursor in oracle?

599


How to execute the package in oracle?

576


Explain the use of inctype option in exp command.

598