DistinctQuery wraps the SQL "distinct" condition on the query. Encoding with ReportQuerySpecs: query class -> type query -> baseName