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 / sandeep

I hope this will be helpful.

SELECT sum(Account) as "Account Sum", sum(Amount) as "Amount
Sum", sum(Amount)-sum(Account) as "Difference" FROM account

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between a web-garden and a web-farm? : Sql dba

554


What is the max nvarchar size?

513


Enlist the advantages of sql.

566


Which table is left in join?

512


Can instead of triggers be used to fire once for each statement on a view?

534






Can we join 3 tables in sql?

492


What is left join example?

498


Is sql an operating system?

543


how do you control the max size of a heap table? : Sql dba

530


What is difference between mysql and postgresql?

506


What is number function in sql?

525


Lookups are a key component in sql server integration services (ssis). Explain its purpose?

529


What does trigger mean in slang?

521


What is procedure in pl sql?

531


How are functions and procedures called in PL/SQL?

586