{"action":"created","issue":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/3171","labels_url":"https://api.github.com/repos/influxdb/influxdb/issues/3171/labels{/name}","comments_url":"https://api.github.com/repos/influxdb/influxdb/issues/3171/comments","events_url":"https://api.github.com/repos/influxdb/influxdb/issues/3171/events","html_url":"https://github.com/influxdb/influxdb/issues/3171","id":91607584,"number":3171,"title":"aggregate functions with distinct function returns no result ","user":{"login":"markuspatrick","id":13067413,"avatar_url":"https://avatars.githubusercontent.com/u/13067413?v=3","gravatar_id":"","url":"https://api.github.com/users/markuspatrick","html_url":"https://github.com/markuspatrick","followers_url":"https://api.github.com/users/markuspatrick/followers","following_url":"https://api.github.com/users/markuspatrick/following{/other_user}","gists_url":"https://api.github.com/users/markuspatrick/gists{/gist_id}","starred_url":"https://api.github.com/users/markuspatrick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markuspatrick/subscriptions","organizations_url":"https://api.github.com/users/markuspatrick/orgs","repos_url":"https://api.github.com/users/markuspatrick/repos","events_url":"https://api.github.com/users/markuspatrick/events{/privacy}","received_events_url":"https://api.github.com/users/markuspatrick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-28T15:00:02Z","updated_at":"2015-07-15T00:31:45Z","closed_at":null,"body":"We use in our application a specific rate of error (type) based on unique values.  The statement below is just a example to clarify the problem. \r\nUsing the distinct functions with count works fine, using sum and count together works fine. \r\nBut using sum and count with distinct function fails. \r\n\r\nFor example: \r\n`select sum(value)/ count(distinct value2) from cpu`\r\nor\r\n`select sum(value)/ count(distinct(value2)) from cpu`\r\n\r\nreturns\r\n```\r\ntime\t\t\t\r\n1970-01-01T00:00:00Z\r\n```\r\nvalue is a float.\r\nvalue2 is a string (i tried also with float - same result)\r\n\r\nI tried in 0.9.0 (ubuntu and OS X 10.10.3) and 0.9.1 rc-1(ubuntu)  "},"comment":{"url":"https://api.github.com/repos/influxdb/influxdb/issues/comments/121435576","html_url":"https://github.com/influxdb/influxdb/issues/3171#issuecomment-121435576","issue_url":"https://api.github.com/repos/influxdb/influxdb/issues/3171","id":121435576,"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":"2015-07-15T00:31:45Z","updated_at":"2015-07-15T00:31:45Z","body":"@markuspatrick what are the results of `select sum(value) from cpu` and `select count(distinct(value2)) from cpu`?"}}