SQLite Forum

Help please importing data
Login
You could also "recurse backwards" to get the result so that you do not need to duplicate the subquery:

```
with series(value)
  as (
         select max(Details)
           from EventTable
          where EventType = 35
      union all
         select value - 1
           from series
          where value > 1
     )
select value from series where value is not null order by value;
```