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
How to create your own reports in sql developer?
Is vs as in pl sql?
Is delete faster than truncate?
column A column b | output 10 7 | 10 5 8 | 8 7 -9 | 7 3 5 | 5 0 6 | 6 Write a sql query to print such output.
What are the different ways to optimize a sql query?
what are the differences between binary and varbinary? : Sql dba
what are the advantages and disadvantages of views in a database? : Sql dba
How can we store rows in PL/SQL using array?
What is partition by in sql?
What are system versioned tables?
What is foreign key in sql with example?
what is a unique key ? : Sql dba
How do I view tables in mysql?
What is cursor explain with example?
define data blocks ? : Sql dba