On 8 Mar 2017, at 3:35pm, Dominique Devienne <ddevie...@gmail.com> wrote:
> 
> Then the results where in alphabetical order of bucket names,
> so I had to re-join on ranges to order by ranges.low.

You should be able to just add the ORDER BY clause to the original JOIN:

SELECT ranges.name, bytes_per_set.v
 FROM bytes_per_set
 JOIN ranges ON bytes_per_set.v >= ranges.low
            AND bytes_per_set.v < ranges.high
 ORDER BY ranges.low

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to