{"action":"reopened","issue":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/3976","labels_url":"https://api.github.com/repos/influxdb/influxdb/issues/3976/labels{/name}","comments_url":"https://api.github.com/repos/influxdb/influxdb/issues/3976/comments","events_url":"https://api.github.com/repos/influxdb/influxdb/issues/3976/events","html_url":"https://github.com/influxdb/influxdb/issues/3976","id":104745417,"number":3976,"title":"[feature request] RATE function","user":{"login":"cnelissen","id":609143,"avatar_url":"https://avatars.githubusercontent.com/u/609143?v=3","gravatar_id":"","url":"https://api.github.com/users/cnelissen","html_url":"https://github.com/cnelissen","followers_url":"https://api.github.com/users/cnelissen/followers","following_url":"https://api.github.com/users/cnelissen/following{/other_user}","gists_url":"https://api.github.com/users/cnelissen/gists{/gist_id}","starred_url":"https://api.github.com/users/cnelissen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cnelissen/subscriptions","organizations_url":"https://api.github.com/users/cnelissen/orgs","repos_url":"https://api.github.com/users/cnelissen/repos","events_url":"https://api.github.com/users/cnelissen/events{/privacy}","received_events_url":"https://api.github.com/users/cnelissen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-03T17:31:49Z","updated_at":"2015-09-08T23:57:53Z","closed_at":null,"body":"Are there any plans to implement a RATE function or similar functionality? What I need is to be able to calculate the rate for a certain event. For example:\r\n\r\nInsert some event data every 1 minute: \r\nclicks value=100 2015-09-02T22:40:00Z\r\nclicks value=125 2015-09-02T22:41:00Z\r\nclicks value=181 2015-09-02T22:42:00Z\r\nclicks value=112 2015-09-02T22:43:00Z\r\nclicks value=205 2015-09-02T22:44:00Z\r\n\r\nNow I want to know clicks per second for every 5 minute interval for the last day:\r\n\r\nSELECT RATE(SUM(value)) FROM clicks WHERE time > now() - 1d GROUP BY time(5m)\r\n\r\nThere were 723 clicks during this 5 minute period, which equates to a click per second rate of 2.41 (723 / 300 seconds)\r\n\r\nI see there is a DERIVATIVE function, but that only tells us the difference between the two points, not the data rate."}}