Added tests for DDC-2361

Added the test for the order by clause removal for mssql servers