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


Please Help Members By Posting Answers For Below Questions

How many types of cursors supported in pl/sql?

794


Why do we use joins?

775


explain normalization concept? : Sql dba

788


What is the difference between cluster and non-cluster index?

805


what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba

751






How many sql statements are used? Define them.

774


Can a composite key be null?

713


Determine if oracle date is on a weekend?

766


What are the types of join and explain each?

773


What is multiple partition?

696


What type of join is sql join?

719


Is sql harder than python?

821


What is sql in java?

756


What are character functions?

804


how many sql dml commands are supported by 'mysql'? : Sql dba

790