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
How many scalar data types are supported in pl/sql?
how to enter characters as hex numbers? : Sql dba
What is the difference between truncate and drop statements?
Does sql between include endpoints?
What is the difference between left join and right join?
How do I view a sql database?
What is memory optimized table?
What is a behavioral trigger?
Can I join the same table twice?
Define overloaded procedure?
What are stored procedures in mysql?
Is oracel sql developer written in java?
What are aggregate functions in sql?
What is the most common sql injection tool?
What is difference between rank () row_number () and dense_rank () in sql?