On 8 Mar 2017, at 3:35pm, Dominique Devienne <[email protected]> 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
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users