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 |
what are enums used for in mysql? : Sql dba
Write a query to find the name of employees those who have joined on Monday.(based on column hire_date)
wt is the diff b/w greast and max ,least and min? wt is the diff b/w case and decod?
4 Answers Oracle, TCS, Tecnics,
What is difference between triggers and stored procedures. And advantages of SP over triggers ?
Can we use distinct and group by together?
how to see the create table statement of an existing table? : Sql dba
When we give SELECT * FROM EMP; How does oracle respond?
24 Answers Accenture, HCL, Infosys,
what is “go” in t-sql? : Transact sql
What is bulk compiling in pl/sql.?
what is the bond code in materialized view?
What are the types of functions in sql?
What are the new features in Oracle 10g. Compared to Oracle 9i?