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

select abs(sum(c1.amounts)-sum(d1.amounts)) 'Amount
difference' from account c1, account d1 where
c1.accounts='c' and d1.accounts='d'

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is error ora-12154: tns:could not resolve the connect identifier specified?

1090


Explain the purpose of %type and %rowtype data types?

942


is mysql query is case sensitive? : Sql dba

1113


What is sql constant?

1041


What are the different types of functions in sql?

1066


How do I save a stored procedure?

1020


What are basic techniques of indexing?

1395


Explain polymorphism in pl/sql.

1129


Is a foreign key always unique?

951


What are the main features of cursor?

1078


What is having clause in sql?

977


Can function return multiple values in sql?

1066


What is oracle pl sql developer?

993


What is a sql instance vs database?

1130


What is posting?

1042