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

SELECT SUM(C)-SUM(D) FROM TABLE_NAME;

Is This Answer Correct ?    8 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

1066


GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?

3010


What is trigger point?

950


How to run sql statements through the web interface?

986


What is output spooling in sql*plus?

986


What are the different types of tables in sql?

931


How many types of index are there?

962


what is uncommittable transactions? : Transact sql

956


How do I audit the sql sent to the server?

958


What is a parameter query?

1023


Mention what plvcmt and plvrb does in pl/sql?

1062


Explain ttitle and btitle.

1058


Is microsoft sql free?

1045


Which is faster count (*) or count 1?

969


What is function and procedure?

986