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 is a sql instance vs database?

569


what are the drivers in mysql? : Sql dba

548


What is raid? How does it help storage of databases?

594


What is field delimiter?

627


Is sql developer case sensitive?

510






What is dml statement?

511


Explain sql data types?

616


How does an execution block start and end in pl sql?

491


What are the different datatypes available in PL/SQL?

560


Explain the types of joins in sql?

565


Which table is left in join?

511


explain mysql aggregate functions. : Sql dba

541


Is inner join same as self join?

572


What is java sql drivermanager?

539


What is nosql db?

532