This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'd like to convert the following query to hql...
It's pretty complicated!
, NVL(b.COL1, 0) AS WORKING
, NVL(c.COL2, 0) AS RECRUITED
, NVL(d.COL3, 0) AS FIRED
FROM PM_CATEGORY a
LEFT OUTER JOIN (SELECT CATEGORY_ID,
COUNT(*) OVER (PARTITION BY CATEGORY_ID, TRE_NODE_ID3) AS COL1
WHERE TRE_NODE_ID3 = 1
) b ON a.ID = b.CATEGORY_ID
ORDER BY 1