Original query:

SELECT wb.pzInsKey as ".pzInsKey", wb.pxRefQueueKey as ".pxRefQueueKey", wb.pxRefObjectKey as ".pxRefObjectKey", qsla.pxSaveDateTime FROM
pegadata.pr_sys_queue_sla qsla INNER JOIN pegadata.pc_assign_workbasket wb ON wb.pxRefQueueKey = qsla.pyItemId WHERE qsla.pyItemStatus =
'Broken-Process'UNION SELECT '' as ".pzInsKey", pyItemId as ".pxRefQueueKey", pegadata.pr_read_from_stream('pyInsHandles(1)', pzInsKey, pzPVStream)
as ".pxRefObjectKey", pxSaveDateTime FROM pegadata.pr_sys_queues WHERE pyItemStatus = 'Broken-Process' ORDER BY 4 DESC LIMIT 25