Closed shriram closed 6 months ago
Thanks! Fixed by https://github.com/brownplt/pyret-docs/commit/31e1f748ca9311bc3a8bc3d4bdb07100c03167bf
I think ascending/descending were picked because they make a little more sense with data that doesn't represent a quantity but is orderable (like strings). Doesn't mean they are the perfect/better choice, but that was the reasoning!
Did this actually get built and pushed? Unless I'm misreading something, the bug is still there:
[Reported by Aren Guralp.]
Ugh, you're right. There's a strange deploy error on master
. Nothing for you to do about it, I'll see what I can figure out
https://app.travis-ci.com/github/brownplt/pyret-docs/builds/266268147 for reference; the bit that says “Skipping a deployment with the s3 provider because this branch is not permitted: master”
It's deployed:
Tables can be sorted by multiple columns. In general you may select as many columns as desired, and can mix and match ascending and descending sorts. No column can be mentioned more than once.
order some-table:
column1 ascending,
column3 descending,
column2 ascending
end
This example will first sort the data in increasing order on column1. If there are any duplicate values in column1, each such group of rows will be sorted in decreasing order by column3. If there are any duplicates in both columns, each remaining group will be sorted in increasing order by column2.
Fairly certain the text from this page swaps
2
and3
:Also, I think it would be better if the text said "ascending" and "descending" instead of "increasing" and "decreasing", though maybe there were reasons for choosing those words instead.
Bug found by Siddharth Yende.