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 / biswaranjan
this works good for the query
select (select sum(a.amount) from one a where
a.account='d')-(select sum(b.amount) from one b where
b.account='c') from dual;
Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
Why is nosql good?
Write an sql query to select all records from the table?
How do you select unique values in sql?
What view means?
How do you delete a table?
Why do we use triggers?
Are there any features that are decommissioned in 11g that are not present in 11g?
What jobs use sql?
how to add a new column to an existing table in mysql? : Sql dba
what is the difference between $message and $$message? : Sql dba
How does an execution block start and end in pl sql?
What are basic techniques of indexing?
Can we alter stored procedure?
Can we commit in trigger?
How does left join work in sql?