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 / vinay
Select distinct trans_id,max(trans_amt) over (partition by
trans_id,debit_credit_indicator ),min(trans_amt) over
(partition by trans_id,debit_credit_indicator
),debit_credit_indicator from Customer
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is error ora-12154: tns:could not resolve the connect identifier specified?
How does pl sql work?
What is a native sql query?
Why is the cursor important?
Is join and inner join the same?
What is sqlite used for?
Are null values same as that of zero or a blank space?
What are the different types of constraints?
What is number function in sql?
Mention what does plv msg allows you to do?
What are tables and fields in the database?
What is a variable in sql?
Is not null in sql?
What are the advantages of normalization?
What is compilation error in pl sql?