            select
                msf.Lpu_id as "Lpu_id",
                t.MedStaffFact_id as "MedStaffFact_id",
                t.TimeTableGraf_id as "TimeTableGraf_id",
                t.TimeTableGraf_begTime::timestamp(0) as "TimeTableGraf_begTime",
                t.TimeTableType_id as "TimeTableType_id",
                t.Person_id as "Person_id",
                t.TimeTableGrafAction_id as "TimeTableGrafAction_id",
                t.TimeTableGraf_insDT::timestamp(0) as "TimeTableGraf_insDT",
                t.TimeTableGraf_updDT::timestamp(0) as "TimeTableGraf_updDT"
            from
                v_TimeTableGrafHist t
                inner join v_MedStaffFact msf on msf.MedStaffFact_id = t.MedStaffFact_id
            where
                t.TimeTableGraf_updDT between '2023-07-22 22:53:26' and '2023-08-01 22:53:26'
                 and (msf.Lpu_id = '13102166')
            order by
                t.TimeTableGrafHist_id
