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.

pls give me answer. i want urgent

Answer Posted / prativa mishra

SELECT trans_id,MAX(TRANS_AMOUNT),MIN(TRANS_AMOUNT),DEBIT_CREDIT_INDICATOR
FROM CUSTOMER
GROUP BY TRANS_ID
,DEBIT_CREDIT_INDICATOR
ORDER BY TRANS_ID

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to select 10 records from a table?

1142


what are the types of join and explain each? : Sql dba

1023


What is your daily office routine?

2256


Is pl sql useful?

967


How to revise and re-run the last sql command?

1146


what are the differences between get and post methods in form submitting. Give the case where we can use get and we can use post methods? : Sql dba

1117


What is a temp table?

1002


Which join is like an inner join?

1012


What is the difference between function and procedure in pl/sql?

1057


How to get list of all tables from a database?

1139


What is an implicit commit?

1038


Why is sql better than hql?

971


what is a constraint? Tell me about its various levels. : Sql dba

970


Does sql*plus also have a pl/sql engine?

1068


what is the difference between a having clause and a where clause? : Sql dba

1062