Schema design and query


We have 10000 sensors with 15 second measurements.

We want to make averages per minutes for each of the sensors then aggregate all the series by summing them.

I have designed the database to have a measurement by sensor but I can‘t find a solution to build my request.

What is the solution ? find a good query ? or change the schema and create only one (big) measurement with specific tag ?
Thank you in advance,