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.
Answers were Sorted based on User's Feedback
Answer / sandeep
I hope this will be helpful.
SELECT sum(Account) as "Account Sum", sum(Amount) as "Amount
Sum", sum(Amount)-sum(Account) as "Difference" FROM account
| Is This Answer Correct ? | 0 Yes | 2 No |
Describe types of sql statements?
How do you use a while loop in pl sql?
Can 2 queries be executed simultaneously in a distributed database system?
What are the two types of exceptions in pl/sql?
What is difference between hql and sql?
What is the meaning of disabling a trigger?
How many types of primary keys are there?
Explain Connect by Prior?
How is a PL/SQL code compiled?
one of the column in my table contains the data like SAL ---- 1000 1000 2000 3000 3000 So my requirement is i want output like SAL --- 1000 2000 3000 it mean i want to delete duplicate rows only how should u write query?
What is the difference between function, procedure and package in pl/sql?
What is a data manipulation language?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)