On 5 Apr 2016, at 10:06, Graham Holden wrote: > Change "select abs(num)" in your second example to "select num" and > you should be good. I'm guessing in your first example the ORDER BY > only applies to the last SELECT.
I expect you're right, but https://www.sqlite.org/lang_select.html seems to suggest that ORDER BY covers the entire compound SELECT. I wonder whether this is a documentation bug or just me. Best regards, Niall O'Reilly

