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

How to disable a trigger name update_salary?

645


Why we use stored procedure instead of query?

513


write an sql query to find names of employee start with 'a'? : Sql dba

552


What are the two virtual tables available at the time of database trigger execution?

609


What is sp_helptext?

568






Explain character-manipulation functions?

599


How can triggers be used for the table auditing?

570


What do you understand by pl/sql records?

507


What is the need of a partition key?

513


What are the types pl/sql code blocks?

583


What is the largest value that can be stored in a byte data field?

505


How we can update the view?

577


How can we implement rollback or commit statement in a trigger?

551


Is full outer join same as cross join?

475


What is the difference between microsoft sql and mysql?

483