We need to compare two successive records of a table based
on a field. For example, if the table is CUSTOMER, and the
filed is Account_ID, To compare Account_IDs of record1 and
record2 of CUSTOMER table, what can be the query ?
Answer Posted / suman rana
select * from
(SELECT account_id , lead(account_id, 1, 0) over (order by
1) nxt_account_id FROM customer)
where account_id = nxt_account_id
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is meant by magic query
What are the four Oracle system processes that must always be up and running for the database to be useable?
Explain the use of owner option in exp command.
How would you edit your CRONTAB to schedule the running of /test/test.sh to run every other day at 2PM?
What is raw datatype?
How to convert a date to char in oracle? Give one example.
Explain index?
Explain a data segment?
How to export data with a field delimiter?
When do you get a .pll extension in oracle? Explain its importance
How to use an explicit cursor without open statements?
What are the attributes of cursor?
Explain what are the uses of rollback segment?
What are named parameters?
What is max rowid in oracle?