Add missing ORDER BY in a CTE (#3282)

Otherwise, the query output might not be consistent.
pull/3285/head
Önder Kalacı 2019-12-11 10:24:54 +01:00 committed by GitHub
parent 90568a87d0
commit fecf61ef1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -393,7 +393,7 @@ cte2 AS (
) )
SELECT user_id, time, value_1, min(count) FROM cte2_1_1 GROUP BY 1, 2, 3 ORDER BY 1,2,3 SELECT user_id, time, value_1, min(count) FROM cte2_1_1 GROUP BY 1, 2, 3 ORDER BY 1,2,3
) )
SELECT * FROM cte2_1 LIMIT 3 OFFSET 2 SELECT * FROM cte2_1 ORDER BY 1,2,3,4 LIMIT 3 OFFSET 2
) )
SELECT * FROM cte2; SELECT * FROM cte2;
user_id | time | value_1 | min user_id | time | value_1 | min

View File

@ -321,7 +321,7 @@ cte2 AS (
) )
SELECT user_id, time, value_1, min(count) FROM cte2_1_1 GROUP BY 1, 2, 3 ORDER BY 1,2,3 SELECT user_id, time, value_1, min(count) FROM cte2_1_1 GROUP BY 1, 2, 3 ORDER BY 1,2,3
) )
SELECT * FROM cte2_1 LIMIT 3 OFFSET 2 SELECT * FROM cte2_1 ORDER BY 1,2,3,4 LIMIT 3 OFFSET 2
) )
SELECT * FROM cte2; SELECT * FROM cte2;