
                        select count(EvnSection_id) as "cnt"
                        from v_EvnSection ES
                        where ES.EvnSection_pid = '500801209221242'
                            and ES.EvnSection_id != coalesce('500801209228794'::bigint, 0)
                            and ES.EvnSection_setDT > '2023-07-22 16:16'
                            and ES.EvnSection_setDT < '2023-07-28 12:00'
                    
