How to get the average growth rate?

I’m using prometheus+influxdb+grafana, the problem is that I want to show the average growth rate of an upstream flow data and failed.
my query on grafana is below:
SELECT derivative(sum(“value”), 1s) FROM “autogen”.“nginx_upstream_bytes” WHERE (“instance” =~ /^$Instance$/ AND “upstream” =~ /^$Upstream$/ AND “direction” = ‘in’) AND $timeFilter GROUP BY time($__interval)

this show the growth rate per second of last 15s group by interval(15s), but I want to show the growth rate per second of the last 5min group by interval(15s), what should I write?
Make another statement, calculate the growth rate per second of the last 5min every 15s.
Glad to provide any further information