Downsampling with task and flux

I’d like to downsample a bucket with 1-day retention. I’m trying to keep everything(fields, tags, measurement) same but only sum number values.

Example Bucket

From

bucket: "statistics-daily"
retention: "1d"
measurement: "users"
tag: N/A
fields: money_spent[NUMBER], login[NUMBER], user_id[STRING]

To

bucket: "statistics"
retention: N/A
measurement: "users"
tag: N/A
fields: money_spent[NUMBER], login[NUMBER], user_id[STRING]
task: daily -> from "statistics-daily" to "statistics"

How can I achieve/write it with Flux?