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 are inner outer left and right joins in sql?

1016


Is sql considered coding?

1048


What do you mean by field in sql?

1077


can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible? : Sql dba

997


Why is sharding used?

997


What is restrict in sql?

1119


What is the difference between stored procedure and view?

1020


How can I delete duplicate rows?

1017


How do I save a stored procedure?

1008


Difference between truncate, delete and drop commands?

1082


Name three sql operations that perform a sort.

1013


What do we need to check in database testing?

1018


Why trigger is used in sql?

974


What is trigger in flip flop?

1007


What is case function?

1042