SELECT DISTINCT clause with ORDER BY for MSSQL + Handling of 'GROUP BY' and selected columns

Fixes #437