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 a customer table.
trans_id trans_date trans_amt debit_credit_indicator
001 01-JAN-13 1099 cr
001 12-JAN-13 500 db
002 24-FEB-13 400 db
002 23-MAR-13 345 cr
001 18-APR-13 800 cr
002 15-MAR-13 600 db
001 12-FEB-13 200 cr

i want like this output.

trans_id trans_amt debit_credit_indicator

i want get highest credit amount and lowest credit amount
and highest debit amount and lowest debit amount for each
trans_id.

Answer Posted / prativa mishra

select
trans_id,debit_credit_indicator,max(trans_amount),min(trans_am
ount) from customer1
group by trans_id,debit_credit_indicator
order by trans_id

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to pipe multiline string to isql?

998


How can a function retun more than one value in oracle with proper example?

1061


What is pl sql package?

1022


What is not null in sql?

1036


Explain the types of joins in sql?

1015


What is cross join example?

972


what is sql? : Sql dba

1003


What is the use of sqlerrd 3?

928


What is the syntax and use of the coalesce function?

1144


What is group function in sql?

1002


What is data type in database?

975


how to start mysql server? : Sql dba

1182


Why select is used in sql?

1002


What is the difference between mdf and ndf files?

1097


Explain correlated query work?

1041