Paste #200545

   
pasted on 24.06.2021 16:36
  • Edit to this paste
  • Print
  • Raw
  • Compare with paste
    #  
  • Toggle line numbers
  • Syntax highlighting  
Text paste
1
2
3
4
5
6
7
 select 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);
Add Comment
Author