I can't remember why, but the SqlServer paging requires that any DISTINCT query have a GROUP BY that matches the SELECT clause. In cases where an aggregate sub-select is a column in the SELECT clause, the query will blow up since you cannot have aggregates in a GROUP BY. This needs to be confirmed as valid.
I can't remember why, but the SqlServer paging requires that any DISTINCT query have a GROUP BY that matches the SELECT clause. In cases where an aggregate sub-select is a column in the SELECT clause, the query will blow up since you cannot have aggregates in a GROUP BY. This needs to be confirmed as valid.
See https://github.com/dhumphreys/cfrel/blob/develop/src/visitors/SqlServer.cfc#L30.