Fixed SQL that could be considered invalid on the targeted platforms in LimitSubqueryOutputWalkerTest
Fixed how order by items are included in the select list of the select distinct wrapper statement