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
Why do we use sqlite?
Is microsoft sql free?
how to get @@error and @@rowcount at the same time? : Sql dba
What is the maximum database size for sql express?
What are basic techniques of indexing?
What is range partitioning?
What do you know by pl/sql cursors?
Can we create foreign key without primary key?
Mention what does plv msg allows you to do?
What are joins in sql?
what's the difference between a primary key and a unique key? : Sql dba
What are the qualities of 2nf?
What is sql dialect?
What is compute?
What is field delimiter?