쿼리 아래에서 이렇게하면 우리는 아래의 쿼리를 사용하여 표시된 날짜 중 어느 것이 saturday이고 일요일이 그 날짜를 제거해야만 필터를 추가하고자합니다 표시되지 않습니다 누구든지 아래의 쿼리 에서이 필터를 확장하는 방법을 안내 할 수 있습니다 .. 아래 쿼리는 내가이 포럼에서 얻었지만이 쿼리와 함께 나는 위의 질문을 만족시킬 몇 가지 쿼리가 필요합니다. 추가 조건이 쿼리오라클 쿼리 도움이 필요합니다
with date_range as (
select min(the_date) as oldest,
max(the_date) as recent,
max(the_date) - min(the_date) as total_days
from your_table
),
all_dates as (
select oldest + level - 1 as a_date
from date_range
connect by level <= (select total_days from date_range)
)
select ad.a_date
from all_dates ad
left join your_table yt on ad.a_date = yt.the_date
where yt.the_date is null
order by ad.a_date;
"최대 (the_date) - 분 (total_days) as total_days"는 포함되지 않습니다. 1 월 1 일에서 2 월 1 일까지의 total_days가 "2"라고 가정 할 경우 1을 추가하십시오. –