My first try at using Redshift. Trying to use ORDER BY and not getting the expected result. The output table should be sorted by column "a".
Here are the steps:
1. Create tbl_data
SELECT 3 as "a", 30 as "b"
UNION ALL
SELECT 3 as "a", 30 as "b"
UNION ALL
SELECT 2 as "a", 20 as "b"
UNION ALL
SELECT 2 as "a", 20 as "b"
UNION ALL
SELECT 1 as "a", 10 as "b"
UNION ALL
SELECT 1 as "a", 10 as "b"
2. Order and output as pd_a1
SELECT *
FROM "tbl_data"
ORDER BY "a"
Here is the result:
https://drive.google.com/open?id=1s6L4LDPijFJY6Hjrp9F6Nsh9JBeo6yH3
Thanks for your attention.