Simply add ranges to the query at runtime. If you’re not familiar with it, look at existing reports in AOT.