Invalid SQL is generated when using COUNT in conjunction with DISTINCT for MSSQL.
For Instance code:
q.From("my_table").Distinct().AsCount()
Will generate:
SELECT COUNT(DISTINCT *) AS [count] FROM [my_table]
I would be grateful if you could prioritize a fix.