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
Explain the purpose of %type and %rowtype data types with the example?
How to create your own reports in sql developer?
what is transaction? : Sql dba
how to decrement dates by 1 in mysql? : Sql dba
Explain what is a field in a database and record in a database?
Is big data nosql?
What is an exception in PL/SQL? What are the two types of exceptions?
Which are the different types of indexes in sql?
What is cross join sql?
What is exit statement?
what are numeric data types? : Sql dba
How do I write a sql query in pgadmin 4?
What are conditional predicates?
What are inner and outer joins examples of both?
How to make a copy values from one column to another in sql?