I have the following query:
SELECT   *
,        abs(random()) / (250 * 1000 * 1000 * 1000 * 1000 * 1000) + 1 AS
randomiser
FROM     stock
ORDER BY randomiser + julianday("Last Used")
LIMIT    <SOME VALUE>

I prefer to use something I never used or long ago. That is why I use the
random. Randomiser gives a value between 1 and 37.

I use:
    (250 * 1000 * 1000 * 1000 * 1000 * 1000)
because I find that more clear as:
​    250000000000000000​

​But is there a better way?​

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

Reply via email to