Replicate SQL with sub-queries inside PRPC
Hi,
I'm trying to replicate this SQL in PRPC:
SELECT T1.pxassignedoperatorid,
T1.TOTAL,
T2.SLADEADLINE
FROM
(SELECT pxassignedoperatorid,
COUNT (*) AS TOTAL
FROM pc_assign_workbasket
GROUP BY pxassignedoperatorid
) T1
LEFT OUTER JOIN
(SELECT pxassignedoperatorid,
COUNT (*) AS SLADEADLINE
FROM pc_assign_workbasket
WHERE pxdeadlinetime IS NOT NULL
GROUP BY pxassignedoperatorid
) T2
ON T1.pxassignedoperatorid = T2.pxassignedoperatorid
ORDER BY T1.pxassignedoperatorid
To get a table like this:
PXASSIGNEDOPERATORID | TOTAL | SLADEADLINE
WorkBasket1 | 18 | 3
WorkBasket2 | 688 | (null)
WorkBasket3 | 1029 | 66
The above works in Oracle's SQL Developer. But I can't seem to find a solution in PRPC using Report Definitions... I tried using two Sub-Reports (one for each query in the parenthesis) inside a Report Definition, but I can't configure the "left outer join".
Any help is appreciated.
Thanks,
Jose