in sql table following column r there
i want find 1st paid ,2nd paid,3rd paid date for same
|service_type|date |vehicle_no|
|------------|------|_---------|
|paid |23 jan|MH12H2007 |
| | | |
|paid |26 feb|MH12H2007 |
| | | |
| | | |
|paid |28 mar|MH12H2007 |
i want o/p like below
vehicle no| 1st paid date | 2nd paid date|3rd paid |latest
paid date|
pls help me out
Answer Posted / vijay_1994
with temp as (select
service type,
paid,
vechile no,
dense_rank()over(order by date asc) as a
from table
select * from temp where a<=3;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can you do multiple joins in sql?
What is an oracle stored procedure?
What is union and union all keyword in sql and what are their differences?
What are the basic techniques of indexing?
How can we debug in PL/SQL?
Why do we create views in sql?
What is trigger explain with example?
Can one improve the performance of sql*loader? : aql loader
what is log shipping? : Sql dba
Inline the values in PL/SQL, what does it mean.?
What action do you have to perform before retrieving data from the next result set of a stored procedure ?
What is difference between sql function and stored procedure?
what does it mean to have quoted_identifier on? : Sql dba
How do you explain an index?
What is clause in sql?