* 현재 데이터
ID |
EVENTTIME |
A |
20120101 |
B |
20120102 |
C |
20120104 |
D |
20120105 |
*결과물
ID |
INTIME |
OUTTIME |
A |
|
20120101 |
B |
20120101 |
20120102 |
C |
20120102 |
20120104 |
D |
20120104 |
20120105 |
with a as
(
select 'A' AS ID, '20120101' AS EVENTTIME from dual
union all
select 'B', '20120102' from dual
union all
select 'C', '20120104' from dual
union all
select 'D', '20120105' from dual
)
select * from a;
위와 같이 결과가 나와야하는데.. 고수님들 답변 부탁드립니다