The %{funcName/} function accepts only groupby columns from unrelated tables. Tables '%{table1/}' and '%{table2/}' are related. ...