Question: how to calculate business days between two dates in oracle sql?
Answer: WITH count_days AS.
(SELECT ROWNUM rnum.
FROM all_objects.
WHERE ROWNUM <= ( TO_DATE (:period_to, 'yyyy-MM-dd') - TO_DATE ( :period_from, 'yyyy-MM-dd') + 1)
)
SELECT COUNT (1)
FROM count_days cds.