我写了这个 mysql 查询并尝试将其转换为 JOOQ 查询但没有成功,这是 mysql 查询
SELECT `P`.`phone_number`, `A`.`emp_no`,
SUM(CASE WHEN VCG.vid IN (
SELECT gv.vid FROM `grvas` gv JOIN gprs gr ON gr.id=gv.grid
WHERE gr.id=G.id AND gv.stdate < '2011-08-15' AND gv.enddate > '2011-09-14')
THEN VCG.amount END) AS allow,
... etc...
如何将此查询转换为 JOOQ 查询?
谢谢,