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 / ajit nayak

select distinct vehicle_no, wm_concat( date )
from vehicle_service
group by vehicle_no;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are dml commands?

633


What is dbo in sql?

617


explain commit and rollback in mysql : sql dba

642


what is recursive stored procedure? : Sql dba

614


How much does a sql dba make? : SQL DBA

599






Explain the types of joins in sql?

650


When are we going to use truncate and delete?

627


what is a table in a database ? : Sql dba

647


What are packages in pl sql and also explain its advantages?

623


How do I view a sql database?

656


What are its different types of dbms?

624


What is asqueryable?

617


Can %notfound return null after a fetch?

677


what are integrity rules?

672


What is constant in pl sql?

605