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
Is sql dba a good career? : SQL DBA
What are the operators used in select statements?
What is use of trigger?
What is sql and its types?
What are the indexing methods?
how to include numeric values in sql statements? : Sql dba
what is query cache in mysql? : Sql dba
How do I remove sql plus from windows 10?
What is the use of sqldataadapter?
how to create a new table in mysql? : Sql dba
What is sql exception?
What is nvarchar max in sql?
What is Difference Between Unique and Primary Key Constraints?
What are the sql aggregate functions?
What is the purpose of the partition table?