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

How to select unique records from a table?

569


How much does sql certification cost?

543


What is the unique index?

525


What is nosql vs sql?

565


What is assignment operator in pl sql?

561






what is oracle database ? : Sql dba

557


What is delimiter sql?

541


What is an inner join sql?

542


Does truncate remove indexes?

559


what are properties of a transaction? : Sql dba

559


What is natural join in sql?

535


What is on delete restrict?

534


Is there a way to automate sql execution from the command-line, batch job or shell script?

555


What is union?

651


What are expressions?

563