
                
                
                SELECT 
                    PL.PHPLog_id as "PHPLog_id",
                    to_char(PL.PHPLog_insDT, 'YYYY-MM-DD HH24:MI:SS') as "PHPLog_insDT",
                    PL.Controller || ' ('|| CTS.Controller_Name_Ru ||')' as "Controller",
                    PL.Method || (case when MTS.Method_Name_Ru is not null then ' ('|| MTS.Method_Name_Ru ||')' else '' end) as "Method",
                    MTS.Method_Name_Ru as "Method_Name_Ru",
                    PL.ET as "ET",
                    PL.QueryString as "QueryString",
                    ROUND(PL.ET_Query::numeric, 4) as "ET_Query",
                    PL.IP as "IP",
                    PL.Server_IP as "Server_IP",
                    PL.AnswerError as "AnswerError",
                    PL.POST as "POST",
                    PL.pmUser_insID as "PMUser_id",
                    PUC.PMUser_Login as "PMUser_Login",
                    'false' AS "Methods_IsUsePersonData"
                    
                    
                FROM
                
                    PHPLog2 PL
                    left join promed.pmUserCache PUC on PUC.PMUser_id = PL.pmUser_insID
                    left join promed.Controllers CTS on CTS.Controller_Name = PL.Controller
                     left join promed.Methods MTS on MTS.Method_Name = PL.Method 
                    
                     WHERE 
                cast(PL.PHPLog_insDT as date) >= '2023-07-27' and cast(PL.PHPLog_insDT as date) <= '2023-07-27' and PUC.PMUser_Login ilike 'ArhipovaTV' || '%'
                
                
                        ORDER BY
                            
                    PL.PHPLog_id desc
                    
                OFFSET 0 ROWS
                FETCH NEXT 50 ROWS ONLY
                
