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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is indexing oracle sql?

1026


How do you write an inner join query?

892


What are string functions in sql?

1174


What is basic structure of pl sql?

990


How do you delete data from a table?

976


Mention what is the function that is used to transfer a pl/sql table log to a database table?

934


What is dense_rank?

880


what are the difference between clustered and a non-clustered index? : Sql dba

979


How to get list of all tables from a database?

1109


How to create an array in pl/sql?

1015


What is data profiling in sql?

1021


Is a foreign key always unique?

885


how to install mysql? : Sql dba

1047


What are predefined functions in sql?

980


Why we use joins in sql?

926