fixup! implement having clause analysis