2 Replies Latest reply: Apr 9, 2014 10:06 AM by Christian Lauritzen RSS

    Join problem; Sum in the where clause

    Christian Lauritzen

      Ideas why the join below does not work?


      I suspect that I cannot use sum in the where clause, but hopefully I am wrong and there is another explanation. Would appreciate any hints!


      Left join(Relations) LOAD Distinct


        FirstValue(tmp_rKey) as LeftKey2,

        FirstValue(tmp_sKey) as RightKey2

      Resident Relations

      where sum(docs) = 0

      group by relKey;