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
what is csv? : Sql dba
why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba
What is a table partition?
What are predefined functions in sql?
What are the types of variable use in pl sql?
What is integrity in sql?
What are three advantages to using sql?
How do you concatenate in sql?
What does varchar include?
how to create a new table in mysql? : Sql dba
what is innodb? : Sql dba
table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
how to concatenate two character strings? : Sql dba
What are the disadvantages of not performing database normalization?
what is normalization? : Sql dba