Many examples use input table t1, created with these statements:
CREATE TABLE t1 (a int, b int) DISTRIBUTE BY hash(a);
INSERT INTO t1 VALUES (0,0),(0,1),(1,0),(1,1),(2,0),(2,1),(3,0),(3,1),(4,0),(4,1),(5,0),(5,1);
This query returns the following table:
SELECT * from t1 ORDER BY a, b;
a | b |
---|---|
0 | 0 |
0 | 1 |
1 | 0 |
1 | 1 |
2 | 0 |
2 | 1 |
3 | 0 |
3 | 1 |
4 | 0 |
4 | 1 |
5 | 0 |
5 | 1 |
(12 rows)