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
How can we store rows in PL/SQL using array?
What is use of term?
What is schema in sql?
What is pl sql package?
How is debugging done?
Explain what is sql*plus?
Is sql better than excel?
What is the difference between sql and t sql?
Can we insert data into view?
Can a procedure in a package be overloaded?
How do you use a while loop in pl sql?
Can we use views in stored procedure?
what is a database? : Sql dba
What are the types of optimization?
What are the types of functions in sql?