Hello @AndreKR,
I apologize for the delay.
If you want to calculate the in_total_bytes per src_port you can do the following:
It would look like something like:
import "influxdata/influxdb/schema"
from(bucket: "your_bucket_name")
|> range(start: -1h) // Adjust the time range as needed
|> filter(fn: (r) => r._measurement == "your_measurement_name")
// Optionally, filter by specific fields
|> filter(fn: (r) => r._field == "in_total_bytes")
|> schema.fieldsAsCols()
// Group by the desired field
|> group(columns: ["src_port"])
// Sum the values in the field of interest
|> sum(column: "in_total_bytes")