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
What is the difference between the conventional and direct path loads? : aql loader
how many triggers are allowed in mysql table? : Sql dba
Which operator is used in query for pattern matching?
What is an exception in PL/SQL? What are the two types of exceptions?
Can we call dml statement in function?
How many commands are there in sql?
What is the difference between row level and statement level trigger?
which operator is used in query for pattern matching? : Sql dba
Why function is used in sql?
in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.
What is a database trigger?
what are the drivers in mysql? : Sql dba
What does where 1/2 mean in sql?
What is query syntax?
How do you break a loop in pl sql?