[sqlite] Need two ORDER two times when using RANDOM

2018-03-10 Thread Cecil Westerhof
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)

[sqlite] Why this LIMIT

2018-03-10 Thread Cecil Westerhof
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] New Project: PyDAO - For SQLite

2018-03-10 Thread R.A. Nagy
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