• I have never thought of using count and count distinct in a having clause the way you do. Brilliant. Thanks.