Thin out data in Bucket

Hi!

I use ioBroker to store values in an influxdb.

The Storage used by my bucket is getting quit big so I want to thin out the Measurements.

e.g. only keep Min/Max value per day or maximum 24 values per day(one per hour)

Is there a built-in feature for that or at least a best-practise way?

A: Can I create queries to do delete data I don’t need?
B: I set my Bucket to keep data only for a certain time and write a program/script to shuffle the data I want to keep forever(or at least for a longer period) in another bucket.

Thanks