Query to get the login failed attempt details (MSSQL & PGSQL)

Query to get the login failed attempt details (MSSQL & PGSQL)

Tested in builds PGSQL (14300) or MSSQL (14306)
Go to Reports tab > New Query Report, use the below query to get the login failed attempts details,

select principal "User Name", LONGTODATE(timestamp), HOSTNAME, OPERATIONNAME from AuditRecord ar LEFT JOIN OperationAuditRecord oar ON ar.AUDITID = oar.AUDITID where RESULT = 'FAILED';

Sample output:
                  New to ADManager Plus?

                    New to ADSelfService Plus?