other = a.otherBut I get this error:ERROR: invalid reference to FROM-clause entry for table "a"
LINE 1: ...ue), COUNT(DISTINCT value) FROM other WHERE other=a.other GR...
HINT: There is an entry for table "a", but it cannot be referenced from this part of the query.
One possible solution to this error is to add the word "LATERAL" before LEFT JOIN so that the right side of the join can reference variables from the left side.
David J.