Tested in Build PGSQL (14300) or MSSQL (14306)
PGSQL:
select slad.slaname "SLA NAME", sdo.name "SITE", ad.org_name "ACCOUNT", slad.duebydays || ' Days,' || slad.duebyhours || ' Hours,' || slad.duebyminutes || ' Mins' "Resolved Within", slad.fr_duebydays || ' Days' || slad.fr_duebyhours || ',Hours' || slad.fr_duebyminutes || ' Mins' "Responded Within", slad.Overrideoh "Should respond/resolve irrespective of OP Hrs",slad.Overrideholidays "Should respond/resolve irrespective of Holidays", slad.Overrideweekends "Should respond/resolve irrespective of Weekends" from sladefinition slad left join sitedefinition sd ON slad.siteid=sd.siteid left join sdorganization sdo ON sd.siteid=sdo.org_id left join accountsitemapping asm ON slad.siteid=asm.siteid left join accountdefinition ad ON asm.accountid=ad.org_id ORDER BY 3
MSSQL:
select sdo.name "SITE", slad.slaname "SLA NAME", ad.org_name "ACCOUNT", slad.fr_duebydays "Response DueBy Days", slad.fr_duebyhours "Response DueBy Hours", slad.fr_duebyminutes "Response DueBy Minutes", slad.duebydays "Resolution DueBy Days", slad.duebyhours "Resolution DueBy Hours", slad.duebyminutes "Resolution DueBy Mins", slad.Overrideoh "Should respond/resolve irrespective of OP Hrs",slad.Overrideholidays "Should respond/resolve irrespective of Holidays", slad.Overrideweekends "Should respond/resolve irrespective of Weekends" from sladefinition slad left join sitedefinition sd ON slad.siteid=sd.siteid left join sdorganization sdo ON sd.siteid=sdo.org_id left join accountsitemapping asm ON slad.siteid=asm.siteid
left join accountdefinition ad ON asm.accountid=ad.org_id ORDER BY 3
Along with Escalation details:
select sdo.name "SITE", slad.slaname "SLA NAME", ad.org_name "ACCOUNT", slad.fr_duebydays "Response DueBy Days", slad.fr_duebyhours "Response DueBy Hours", slad.fr_duebyminutes "Response DueBy Minutes", slad.duebydays "Resolution DueBy Days", slad.duebyhours "Resolution DueBy Hours", slad.duebyminutes "Resolution DueBy Mins", slad.Overrideoh "Should respond/resolve irrespective of OP Hrs",slad.Overrideholidays "Should respond/resolve irrespective of Holidays", slad.Overrideweekends "Should respond/resolve irrespective of Weekends", SLAE.ESCALATION_TYPE, SLAE.LEVEL, SLAE.ESCAFTERDAYS, SLAE.ESCAFTERHOURS, SLAE.ESCAFTERMINUTES, SLAE.ESCTOTICKETOWNER from sladefinition slad left join sitedefinition sd ON slad.siteid=sd.siteid left join sdorganization sdo ON sd.siteid=sdo.org_id left join accountsitemapping asm ON slad.siteid=asm.siteid
left join accountdefinition ad ON asm.accountid=ad.org_id LEFT JOIN Slaescalation slae ON slad.slaid=slae.slaid ORDER BY 3