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 / anuj shukla
Hi all,
question simply ask for the total of both the columns and
their difference, all in one 'select' statement.
select sum(c)"Sum of C",sum(d)"Sum Of
D",abs(sum(c)-sum(d))"Difference" from accountA
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What is difference sql and mysql?
Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com
What are the different sql languages?
What is an example of translating a date into julian format?
What are the benefits of stored procedures?
what are the differences between require and include, include_once and require_once? : Sql dba
What is partition in sql query?
What is meaning of <> in sql?
What does over partition by mean in sql?
Is sql free?
How many functions are there in sql?
Explain the insert into statements in sql?
differentiate between float and double. : Sql dba
Does access use sql?
What is cursor in pl sql?