Hello @Dmitry Puchkow ,
Azure IoT Central provides basic aggregation.
If you need more capabilities, you need to use the export solution.
From there, export the data to e.g. an EventHub so the data can be picked up by Stream Analytics which can act as a very impressive rule engine.
The data retention of Azure IoT Central is 30 days See the extended FAQ.