On 7 Nov 2019, at 20:47, Chris Peachment <ch...@breksta.com> wrote: > 1. generate a list of pseudo-random numbers, using a pre-defined > seed value, over the range 1 .. count(*) of records in table, > > 2. use that list as record id values to select the desired subset > of the data in the table. > > This would be done in two separate operations, possibly with a > storage of the generated numbers in a separate table which could > be used in the query of the main data.
Yeah, this and some of the other ideas were some things I considered as fallback ideas if things weren't possible within the query, although it does complicate things a bit. I actually just had another idea: How is the behaviour of window functions defined? i.e. if there is an ORDER BY clause are rows added/removed from the window in the order of the order by clause, or is the behaviour of row_number/rank/dense_rank special cased and only those functions guarantee the order? Because if window functions do follow there own order by, you could easily recover a deterministic evaluation order via the window specification. If not, I guess I'll have to give up and do it the "hard way". - Merijn _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users