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 / kamala k n
select type, sum(amount) over (partiton by sid) from tab
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the uses of Database Trigger ?
What are the general rules on data consistency?
Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.
How to connect asp pages to oracle servers?
What is pragma autonomous transaction in oracle?
Explain the use of ignore option in imp command.
How can I convert single byte kana characters into multi byte kana characters and vice-versa.
How to get execution path reports on query statements?
How to use subqueries in the from clause in oracle?
What is private procedure oracle?
How to resolve name conflicts between variables and columns?
How to convert dates to characters in oracle?
How to use an explicit cursor without open statements?
How to create a table index?
Can we store pictures in the database and if so, how it can be done?