Hi there!
In order to select a number of files that have about a certain size in sum, I tried to throw this query:
select id, type, filename, filesize from diskcache_index a where (select sum(filesize) from diskcache_index b where a.id < b.id) < MYCLEANSIZE
I'm doing this to find out a certain list of filenames to be cleaned from a cache to make the cache MYCLEANSIZE smaller. Unfortunately, sqlite does not support referencing of columns to subselects (according to the wiki).
Does anyone know how I can change the query to make it work (or are there alternative queries for this task).
Thanks!
Kind regards,
Stephan