How to re-use one CTE in another CTE in jOOQ
问题 In jOOQ am re-using a CTE in a later CTE. I am trying to summarise student completion records by year and school. I am using jOOQ 3.11.2 and postgres 9.4. I have working SQL code. However in jOOQ, I am getting null values returned. This appears to be a problem with how I am re-using one CTE in a later CTE. At first, I thought it might be a problem with the use of count(). From the manual, it looks like count() is being used correctly. As a test, I removed all reference to count() in the query