344: , min(greatest(w.wo_creation_datetime - i.incident_date, 0))
345: over(partition by i.incident_id) min_response_days
346: , count(*) over(partition by i.incident_id) work_order_count
347: from
348: cs_incidents_all_b i
349: , eam_wo_service_association a
350: , isc_maint_work_orders_f w
351: where
352: i.incident_id = a.service_request_id
835: else
836: 0
837: end ) over(partition by i.incident_id) work_order_count
838: from
839: cs_incidents_all_b i
840: , eam_wo_service_association a
841: , isc_maint_work_orders_f w
842: , isc_maint_req_wo_stg c
843: where