I am trying to backfill a retention policy by downsampling my data by taking the mean. I am doing so with a query that looks like this:
SELECT mean(*) INTO "telegraf"."month".:MEASUREMENT FROM /.*/ WHERE time > now() - 30d GROUP BY time(10m),*
Unfortunately, this has the effect of re-naming all my field keys. e.g. “cpu”.“usage_idle” becomes “cpu”.“mean_usage_idle”.
Is it possible to do this while retaining the original names? I know I could create a separate statement per field and use AS, but that would be very cumbersome.