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 / anuj shukla

Hi all,
question simply ask for the total of both the columns and
their difference, all in one 'select' statement.

select sum(c)"Sum of C",sum(d)"Sum Of
D",abs(sum(c)-sum(d))"Difference" from accountA

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which are sql * plus commands?

714


Why do we go for stored procedures?

734


What is numeric function sql?

724


Why we use cross join?

703


What are pl sql data types?

729






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

752


What is the difference between functions, procedures, and packages in pl/sql?

707


What do you think about pl/sql?

701


Is sql a dbms?

732


What is a unique constraint?

811


Is foreign key mandatory?

716


Which is faster joins or subqueries?

717


Mention what does plv msg allows you to do?

857


Can we change the table name in sql?

707


What is procedure function?

712