ReportSQL - Case Status
Number of Days in Each Case Status
- Replicates the Number of Days in Case Status that you can see from the Case Status History list.
- Numeric formula field on the Case Data > Case Status History (multiple rows per case)
- The
ceilfunction rounds partial days up. Start Date and End Date are timestamps, not simple dates.
ceil(extract(epoch from (coalesce(%tableAlias%.date_end, now()::date) - %tableAlias%.date_start))/86400)