V3.9.9 - DISTINCT doesn't work when used in a Paged Records Query Type

While creating our Paged Custom Query Extension, we faced the same issue.
What we are doing is using ORDER BY (SELECT 1) when there is no order by selected in the query for MSSQL.

You might have a better solution, so not sure how helpful this is.