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 / sudipta santra
select distinct service_type,date,vehicle_no from
vehicle_service
where vehicle_no='MH12H2007' and service_type='paid' and
rownum<4
order by date desc
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is crud diagram?
What is schema in sql?
What is dml and ddl?
What is consistency?
What is the maximum number of triggers, you can apply on a single table?
What is execution plan in sql?
Explain unique key in sql.
What types of commands can be executed in sql*plus?
Is clustered index a primary key?
What are the different type of joins in sql?
How bulk collect improves performance?
What is row_number () in sql?
how many columns can be used for creating index? : Sql dba
What jobs use sql?
how to shut down the server with 'mysqladmin'? : Sql dba