Hey all -- I have a table that I would like to select the first N records where the rolling sum of a given column is less than some literal value. SQL for this might look like:
select item_id from items where rolling_sum(item_size) < 10000 order by item_name; Is there a way to do this? Would sqlite know to stop processing the query once the limit is reached? Manually doing the rolling sum while reading the query result is not a good option for me as I am working with an API on top of sqlite that does not allow this. I am already using a custom collation sequence, so adding a custom function would not be a problem :) cheers, -steve ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------