SQLSTATE[42702]: Ambiguous column: 7 ERROR:  column reference "created_at" is ambiguous
LINE 10: ...(a.created_at) BETWEEN $1 AND $2 ORDER BY to_char(created_at...
                                                              ^ (Connection: pgsql, SQL: SELECT  
                b.name AS client_name,
                --split_part(a.log_key, '#', 1) AS client_id,
                split_part(a.log_key, '#', 2) AS key,
                a.status_code AS code,
                a.message AS msg,
                to_char(a.created_at, 'YYYY-MM-DD HH24:MI:SS') as created
                FROM system_logs a
                JOIN m_clients b on b.id=split_part(a.log_key, '#', 1)::bigint
                WHERE DATE(a.created_at) BETWEEN :start_date AND :end_date ORDER BY to_char(created_at, 'YYYY-MM-DD HH24:MI') desc,log_key,idx OFFSET 0 LIMIT 10)