Paste #202953 |
pasted on 29.06.2021 12:38
- Edit to this paste
- Raw
-
Compare with paste
#
Text paste
1 2 3 4 5 6 7 8 | select round(extract (epoch from CASE when (details -> 'sla' ->> 'slaStopped') is null THEN now()::timestamp else (details -> 'sla' ->> 'slaStopped')::timestamp end) - CASE when details -> 'sla' ->> 'ksSla' is null THEN '0'::integer else (details -> 'sla' ->> 'ksSla')::integer end * 60 - extract(epoch from start_time)) as of_Details_Ks_Sla_plus_start_time from trouble_tickets where id in (148341, 150356, 139280, 148106, 149863); |