I have the following query:
SELECT *
, randomiser
, randomiser
FROM (
SELECT *
, ABS(RANDOM()) / 5E17 AS randomiser
FROM proverbs
WHERE used <> 'notUsed'
ORDER BY randomiser + IFNULL(JULIANDAY(used), 0) ASC
)
ORDER BY randomiser + IFNULL(JULIANDAY(used), 0)
I see that in certain older queries I use:
LIMIT (SELECT COUNT(*) FROM TABLE)
It looks like this has no use (limiting the selected records to the
number of records there are). Anyone an idea what could be a reason for
this?
--
Cecil Westerhof
SQLite devotees interested in Python might like to know of a new *GitHub
Project*.
Designed to generate the code required - as well as to import - data into
an SQLite Database, please allow us to direct your weekend-warrior
activities toward our *PyDAO* Project under *Soft9000*.
SQL-Geeks
3 matches
Mail list logo