{"action":"created","issue":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/1856","repository_url":"https://api.github.com/repos/influxdata/influxdb","labels_url":"https://api.github.com/repos/influxdata/influxdb/issues/1856/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/influxdb/issues/1856/comments","events_url":"https://api.github.com/repos/influxdata/influxdb/issues/1856/events","html_url":"https://github.com/influxdata/influxdb/issues/1856","id":60014753,"number":1856,"title":"Time between events","user":{"login":"Sineos","id":4459312,"avatar_url":"https://avatars.githubusercontent.com/u/4459312?v=3","gravatar_id":"","url":"https://api.github.com/users/Sineos","html_url":"https://github.com/Sineos","followers_url":"https://api.github.com/users/Sineos/followers","following_url":"https://api.github.com/users/Sineos/following{/other_user}","gists_url":"https://api.github.com/users/Sineos/gists{/gist_id}","starred_url":"https://api.github.com/users/Sineos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sineos/subscriptions","organizations_url":"https://api.github.com/users/Sineos/orgs","repos_url":"https://api.github.com/users/Sineos/repos","events_url":"https://api.github.com/users/Sineos/events{/privacy}","received_events_url":"https://api.github.com/users/Sineos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/influxdata/influxdb/labels/category/feature%20request","name":"category/feature request","color":"006b75"},{"url":"https://api.github.com/repos/influxdata/influxdb/labels/category/functions","name":"category/functions","color":"d4c5f9"},{"url":"https://api.github.com/repos/influxdata/influxdb/labels/category/queries","name":"category/queries","color":"5319e7"},{"url":"https://api.github.com/repos/influxdata/influxdb/labels/RFC","name":"RFC","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/influxdata/influxdb/milestones/38","html_url":"https://github.com/influxdata/influxdb/milestones/Longer%20term","labels_url":"https://api.github.com/repos/influxdata/influxdb/milestones/38/labels","id":1020714,"number":38,"title":"Longer term","description":"Milestone for issues that aren't part of this release or the next","creator":{"login":"beckettsean","id":6537329,"avatar_url":"https://avatars.githubusercontent.com/u/6537329?v=3","gravatar_id":"","url":"https://api.github.com/users/beckettsean","html_url":"https://github.com/beckettsean","followers_url":"https://api.github.com/users/beckettsean/followers","following_url":"https://api.github.com/users/beckettsean/following{/other_user}","gists_url":"https://api.github.com/users/beckettsean/gists{/gist_id}","starred_url":"https://api.github.com/users/beckettsean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beckettsean/subscriptions","organizations_url":"https://api.github.com/users/beckettsean/orgs","repos_url":"https://api.github.com/users/beckettsean/repos","events_url":"https://api.github.com/users/beckettsean/events{/privacy}","received_events_url":"https://api.github.com/users/beckettsean/received_events","type":"User","site_admin":false},"open_issues":74,"closed_issues":69,"state":"open","created_at":"2015-03-13T17:41:02Z","updated_at":"2016-03-18T22:36:29Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-03-05T20:57:38Z","updated_at":"2016-03-18T22:36:29Z","closed_at":"2016-03-18T22:36:29Z","body":"Especially with counter or boolean values it would be a benefit to be able to query the time between events.\r\nNormally one would do something like:\r\n```\r\nSELECT sum(value) GROUP BY time(1h)\r\n```\r\nfor example to see how dynamic certain events are. This will work well if a certain amount of events are recorded in the chosen time interval and if the events are relatively equally distributed over time.\r\n\r\nIn case only a small amount of events is given per time interval and even have nil in the chosen interval a calculation of the passed time between the intervals would be a lot more precise.\r\n\r\nThis would be especially useful in combination with the derivative function as it would allow to calculate the volatility of events like cache hits, attacks etc. In event everything that can be counted.\r\n\r\nI would think about a query e.g.\r\n```\r\nSELECT time_between_events(ms) WHERE value > 1\r\n```\r\nto return a table of time in milliseconds that passed between each event that matches the WHERE clause.\r\n "},"comment":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/comments/198568344","html_url":"https://github.com/influxdata/influxdb/issues/1856#issuecomment-198568344","issue_url":"https://api.github.com/repos/influxdata/influxdb/issues/1856","id":198568344,"user":{"login":"beckettsean","id":6537329,"avatar_url":"https://avatars.githubusercontent.com/u/6537329?v=3","gravatar_id":"","url":"https://api.github.com/users/beckettsean","html_url":"https://github.com/beckettsean","followers_url":"https://api.github.com/users/beckettsean/followers","following_url":"https://api.github.com/users/beckettsean/following{/other_user}","gists_url":"https://api.github.com/users/beckettsean/gists{/gist_id}","starred_url":"https://api.github.com/users/beckettsean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beckettsean/subscriptions","organizations_url":"https://api.github.com/users/beckettsean/orgs","repos_url":"https://api.github.com/users/beckettsean/repos","events_url":"https://api.github.com/users/beckettsean/events{/privacy}","received_events_url":"https://api.github.com/users/beckettsean/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T22:36:29Z","updated_at":"2016-03-18T22:36:29Z","body":"As mentioned in my [post to the mailing list](https://groups.google.com/d/msg/influxdb/CkKzZoXDgiU/5E-vDNVGCwAJ) we are experimenting with simplifying our open GitHub Issues. This feature request has been rolled into an [aggregate issue](https://github.com/influxdata/influxdb/issues/5930) for all function requests, so that we can close this issue until we are ready to work on it. \r\n\r\nYou may continue to make comments here. Closing the issue does not mean we are rejecting this idea."}}