influx -database 'database_name' -execute "SELECT * FROM table_name WHERE time >'2021-01-01' and time <'2022-01-01'" -format csv > outputData.csv