在以下查询中
MATCH (i:UT)-[c:Cedes]->(r:UT)
WHERE i.RiIndex=0
WITH r, c, i, (CASE WHEN i.gross > c.xs THEN i.gross-c.xs ELSE 0 END) AS mn
RETURN r, sum(c.pp*(mn)) AS ceded
MATCH (i:UT)-[c:Cedes]->(r:UT)
WHERE i.RiIndex=0
WITH r, c, i, (CASE WHEN i.gross > c.xs THEN i.gross-c.xs ELSE 0 END) AS mn, (CASE WHEN c.lim < mn THEN c.lim ELSE mn END) AS mx
RETURN r, sum(c.pp*(mx)) AS ceded
Variable `mn` not defined (line 3, column 97 (offset: 146))
"WITH r, c, i, (CASE WHEN i.gross > c.xs THEN i.gross-c.xs ELSE 0 END) AS mn, (CASE WHEN c.lim < mn THEN c.lim ELSE mn END) AS mx"
^
是否有人可以建议是否有方法将“mn”变量传递给创建“mx”变量的函数?