Query to get complete SLA details. (PGSQL)

Query to get complete SLA details. (PGSQL)

Tested in build PGSQL (14300) 

To get the complete list of SLA  configured in the application. 

PGSQL:

SELECT sdo.name "Site Name" ,
       sla.slaname "SLA",
       MAX(sla.duebydays) "SLA Days",
       MAX(sla.duebyhours) "SLA Hours",
       MAX(sla.duebyminutes) "SLA Minutes" ,
       MAX(sla.fr_duebydays) "First Response Days",
       MAX(sla.fr_duebyhours) "First Response Hours",
       MAX(sla.fr_duebyminutes) "First Response Minutes",
       array_to_string(array_agg(au.first_name), ' ') "Escalate to" FROM sladefinition sla
LEFT JOIN sitedefinition sdf ON sla.siteid=sdf.siteid
LEFT JOIN sdorganization sdo ON sdf.siteid=sdo.org_id
LEFT JOIN timezonedefinition tz ON sdf.timezoneid=tz.timezoneid
LEFT JOIN slaescalation es ON sla.slaid=es.slaid
LEFT JOIN escalateton eton ON es.escalatetoid=eton.escalatetoid
LEFT JOIN aaauser au ON au.user_id=eton.userid
GROUP BY sdo.name,
         sla.slaname
ORDER BY 2


Sample Output:


                  New to ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • 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 ...
                      • Query report to get the successfully scanned assets (MSSQL & PGSQL)

                        Tested in builds from PGSQL (14300) or MSSQL (14306) Query report to get the successfully scanned assets with audit status, state , Serial no and site. SELECT max(resource.resourcename) "Asset Name", max(resource.SERIALNO) AS "Org Serial Number", ...
                      • Contract and Service Plans details - Query Report (MSSQL & PGSQL)

                        Tested in Build PGSQL (14300) or MSSQL (14306) PGSQL & MSSQL: select ac.contractno "Contract Number", ac.contractname "Contract Name", sp.serviceplanname "Service Plan Name",sp.plantype "Service Plan Type", sp.timeperiod "Bill ...
                      • Query to show SLA assigned to tickets

                        Working on Builds: 14500 and above Database: PGSQL & MSSQL: SELECT slad.slaname "SLA", ad.ORG_NAME AS "Account", wo.WORKORDERID AS "Request ID", LONGTODATE(wo.CREATEDTIME) AS "Created Time", ti.FIRST_NAME AS "Technician", rtdef.NAME AS "Request Type" ...
                      • Query to list the custom and query reports and the technician created (MSSQL & PGSQL)

                        Tested in builds from PGSQL (14300) or MSSQL (14306) Use case The query displays the custom reports and query reports saved by technicians. Query SELECT custrepdet.report_name "Report Name", au.first_name"Created By" from customreportquery custrep ...