sql: fix ORDER BY with multiple params