i have one table with accounts and amounts as
colums.accounts with columns c and d. and amounts with
values 1000,2000,3000 for c and 4000,5000,8000 for d.i need
to find the sum of these accounts c and d individually
and find the differences between their sum using one select
statement.

Answer Posted / apurba

SELECT SUM(C)-SUM(D) FROM TABLE_NAME;

Is This Answer Correct ?    8 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are sql commands?

489


how to present a past time in hours, minutes and seconds? : Sql dba

544


Explain mutating table error.

635


what is an extent ? : Sql dba

573


Why we use cross join?

530






What has stored procedures in sql?

583


How do I edit a trigger in sql developer?

526


Explain the the update statement in sql?

558


What is a trigger in sql?

630


what is data integrity? : Sql dba

583


How do you write an inner join query?

498


What is the difference between the implicit and explicit cursors?

517


Can a primary key be a foreign key?

564


How can you fetch first 5 characters of the string?

536


Why is %isopen always false for an implicit cursor?

560