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


Please Help Members By Posting Answers For Below Questions

What are the different schemas objects that can be created using pl/sql?

727


Can we use having without group by in sql?

732


Can we use commit inside a trigger?

763


Is t sql a programming language?

761


Is inner join same as self join?

785






What is time based sql injection?

688


Is id a reserved word in sql?

860


What information is needed to connect sql*plus an oracle server?

766


How many joins in sql?

736


How to use sql statements in pl/sql?

798


What are the most important characteristics of pl/sql?

782


what is a trigger? : Sql dba

762


Are left and right joins the same?

720


What is the command used to fetch first 5 characters of the string?

1094


What is hibernate and its relation to sql?

787