SELECT po.POCUSTOMID AS "PO Number", max(po.PONAME) AS "PO Name", max(poa.FIRST_NAME) AS "Purchase Requester", longtodate(max(po.DATEORDERED)) AS "Ordered Date", longtodate(max(po.DATEREQUIRED)) AS "Required Date", max(pos.STATUSNAME) AS "PO Status", max(po.TOTALPRICE) AS "Total Price", max(resource.RESOURCENAME) AS "Asset Name", max(state.DISPLAYSTATE) AS "Asset State", max(rCategory.CATEGORY) AS "Asset Category", max(rtype.TYPE) AS "Asset Type", max(aaa.FIRST_NAME) "Approver", max(pos1.STATUSNAME) "PO Approval Status", LONGTODATE(max(poa1.APPROVAL_DATE)) "Approval Date" FROM PurchaseOrder po LEFT JOIN POStatus pos ON po.STATUSID=pos.STATUSID LEFT JOIN SDUser por ON po.REQUESTERID=por.USERID LEFT JOIN AaaUser poa ON por.USERID=poa.USER_ID LEFT JOIN Purchaseorderitem pxt ON po.PURCHASEORDERID=pxt.PURCHASEORDERID LEFT JOIN PurchaseLot plot ON pxt.PURCHASEORDERitemID=plot.PURCHASEORDERitemID LEFT JOIN Resources RESOURCE ON plot.PURCHASELOTID=resource.PURCHASELOTID LEFT JOIN ComponentDefinition product ON resource.COMPONENTID=product.COMPONENTID LEFT JOIN ComponentType productType ON product.COMPONENTTYPEID=productType.COMPONENTTYPEID LEFT JOIN ResourceType rtype ON productType.RESOURCETYPEID=rtype.RESOURCETYPEID LEFT JOIN ResourceCategory rCategory ON productType.RESOURCECATEGORYID=rCategory.RESOURCECATEGORYID LEFT JOIN ResourceState state ON resource.RESOURCESTATEID=state.RESOURCESTATEID LEFT JOIN POLevelInfo pol ON po.PURCHASEORDERID=pol.PURCHASEORDERID LEFT JOIN PurchaseApprovalDetails poa1 ON pol.LEVELINFOID=poa1.LEVELINFOID LEFT JOIN AaaUser aaa ON poa1.APPROVERID=aaa.USER_ID LEFT JOIN levelinfo li ON pol.LEVELINFOID=li.LEVELINFOID LEFT JOIN POApprovalStatus pos1 ON li.LEVELSTATUSID=pos1.STATUSID GROUP BY po.POCUSTOMID ORDER BY 1