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 / akki julak

SELECT SUM(C),SUM(D),SUM(C)-SUM(D) 'difference'
FROM accounts;

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is faster join or subquery?

514


What is a subquery in sql?

512


What are the two different parts of the pl/sql packages?

568


What is a behavioral trigger?

517


How to revise and re-run the last sql command?

654






Is trigger a stored procedure?

510


explain the difference between delete , truncate and drop commands? : Sql dba

553


what is the stuff function and how does it differ from the replace function? : Sql dba

624


what is the syntax for using sql_variant_property? : Transact sql

535


What is sql in java?

549


What is your daily office routine?

1814


How can you tell the difference between an index and a view?

496


what is 'mysqldump'? : Sql dba

573


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

650


what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba

554