Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / akki julak

SELECT SUM(C),SUM(D),SUM(C)-SUM(D) 'difference'
FROM accounts;

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you use a while loop in pl sql?

939


What is rank dense_rank and partition in sql?

965


What port does sql server use?

984


what is data manipulation language? : Sql dba

940


What is over () in sql?

889


Does truncate require commit?

918


Can we use views in stored procedure?

966


what are the advantages of using stored procedures? : Sql dba

1058


List out the acid properties and explain?

902


What is the difference between local variables and global variables?

1064


What is a string data type in sql?

956


What is the difference between syntax error and runtime error?

1062


Does sql support programming?

1006


What are actual parameters and formal parameters?

1032


Can you join a table to itself?

1029