Based on a min and max id obtained from a table, how to calculate how many groups of records I can divide the information intoo
In a table I have 300 records of which I am going to use those rows that have been modified with today’s date.
Through a query I obtain a Minimum ID and a Maximum ID
For example, if I modified rows between ids 1 and 100, the query would return:
min: 1
max: 100
but this does not mean that it modifies all 100 rows, among those values it may modify only 37 rows.
What I need to know is how to be able to divide the total number of rows into groups of 10 rows and how to know the order of the Ids even if they are not consecutive. For example, if we say that there are 37 rows that have been modified, speaking of groups of 10 rows, an example would be as follows: