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
What is faster join or subquery?
What is a subquery in sql?
What are the two different parts of the pl/sql packages?
What is a behavioral trigger?
How to revise and re-run the last sql command?
Is trigger a stored procedure?
explain the difference between delete , truncate and drop commands? : Sql dba
what is the stuff function and how does it differ from the replace function? : Sql dba
what is the syntax for using sql_variant_property? : Transact sql
What is sql in java?
What is your daily office routine?
How can you tell the difference between an index and a view?
what is 'mysqldump'? : Sql dba
How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?
what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba