Query report on Account Details and Date of last ticket created (PGSQL)

Query report on Account Details and Date of last ticket created (PGSQL)

Build no : 14304 , PGSQL

Query report columns - Account , Account creation date , Date of last ticket created

Query :

SELECT     ad.ORG_NAME AS "Account",      LONGTODATE(org.CREATEDTIME) AS "Account Creation Date",     LONGTODATE( MAX(wo.CREATEDTIME)) AS "Date of last ticket created" FROM     PortalAccounts pa     LEFT JOIN AccountDefinition ad ON pa.ACCOUNTID = ad.ORG_ID     LEFT JOIN WorkorderAccountMapping wam ON ad.ORG_ID = wam.ACCOUNTID     LEFT JOIN Workorder wo ON wam.WORKORDERID = wo.WORKORDERID     LEFT JOIN SDOrganization org ON ad.ORG_ID = org.ORG_ID     GROUP BY ad.ORG_ID,ad.ORG_NAME,org.CREATEDTIME



                  New to ADSelfService Plus?