with prm as
(
  select
     to_timestamp('01.02.2022', 'DD.MM.YYYY')::timestamp as p_BegDate,
     to_timestamp('28.02.2022', 'DD.MM.YYYY')::timestamp as p_EndDate
)

select
  L.Lpu_OGRN as "ОГРН ЮрЛица",
  EPS.EvnPS_setDate
from prm
inner join dbo.v_Lpu L on COALESCE(L.Lpu_IsTest, 1) = 1
inner join dbo.v_EvnPS EPS on EPS.Lpu_id = L.Lpu_id
  and EPS.EvnPS_setDate between p_BegDate and p_EndDate
