Pure SQL models that power BI reporting (Qlik Sense in my environment).
Focus: compute SLA response time and billing latency by Work Order and ERP invoice line.
- Multi-CTE pipeline with
OUTER APPLYfor line↔job pairing - Calendar indexing (week/day) + robust date math
- TZ/DST normalization via UDF
- Technician/scheduler ranking & pivoting
STRING_AGGand XMLSTUFF(...FOR XML PATH(''))patterns
- Main query:
/sql/fsm_wo_billing_sla.sql - CTE map:
/sql/00_README.md
FieldServiceDB(source),WarehouseDW(DW/ERP),AnalyticsDB(UDFs)- PII removed; emails replaced by display names.