I would like to sum a numeric column in a SQLite table every say 10 records. Say as an example, I have 75 records and I want the 1st 10 records summed together, then the next 10 and so on, the last 5 records will be summed together. I tried to look for a way to do it using Group BY or Count or LIMIT OFFSET, but to no avail. The records have no common column to group them by.
I can do it using StringBuilder and CASE WHEN condition2 THEN 1, CASE WHEN condition2 THEN 2, etc. , by creating a rank column to GROUP BY, but I was wondering if there is a direct way in SQLite
I can do it using StringBuilder and CASE WHEN condition2 THEN 1, CASE WHEN condition2 THEN 2, etc. , by creating a rank column to GROUP BY, but I was wondering if there is a direct way in SQLite