Hi,
I never managed to got it working, you can check my previous topic Using Flux for retrieving montly data
I was also using the same version of influxdb as yours.
Maybe you can try with 2.0.
I got it working by adding another tag in influxdb so that I was able to group by this tag.