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 |
Explain two virtual tables available at the time of database trigger execution.
What are sql data types?
Can we call procedure in select statement?
in materialized view the structure will create immediately or not?
How to avoid duplicate records in a query?
What is %type in sql?
Suppose There is a string A.B....C.......D.........E........F In this string dots (.) are not having fixed count in between of string. I want the output to have string with one dot between. I.e. A.B.C.D.E.F
Can variables be used in sql statements?
What is schema in sql example?
What are the difference between Functions/Stored Procs and Triggers and where are they used.
what are the different functions in sorting an array? : Sql dba
How many types of cursors are available in pl/sql?
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)