{"action":"closed","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/9896","repository_url":"https://api.github.com/repos/grafana/grafana","labels_url":"https://api.github.com/repos/grafana/grafana/issues/9896/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/9896/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/9896/events","html_url":"https://github.com/grafana/grafana/issues/9896","id":274460077,"number":9896,"title":"Allow non-integer GROUP BY for Postgres","user":{"login":"jleclanche","id":235410,"avatar_url":"https://avatars1.githubusercontent.com/u/235410?v=4","gravatar_id":"","url":"https://api.github.com/users/jleclanche","html_url":"https://github.com/jleclanche","followers_url":"https://api.github.com/users/jleclanche/followers","following_url":"https://api.github.com/users/jleclanche/following{/other_user}","gists_url":"https://api.github.com/users/jleclanche/gists{/gist_id}","starred_url":"https://api.github.com/users/jleclanche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jleclanche/subscriptions","organizations_url":"https://api.github.com/users/jleclanche/orgs","repos_url":"https://api.github.com/users/jleclanche/repos","events_url":"https://api.github.com/users/jleclanche/events{/privacy}","received_events_url":"https://api.github.com/users/jleclanche/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-11-16T10:10:07Z","updated_at":"2018-04-10T20:44:23Z","closed_at":"2018-04-10T20:44:22Z","author_association":"NONE","body":"I have a query returning a table which looks like the following:\r\n\r\n```\r\n 2017-11-15 10:05:04.54195+00  | Dead by Daylight                  |     1\r\n 2017-11-15 10:05:04.54195+00  | Hearthstone                       |    12\r\n 2017-11-15 10:05:04.54195+00  | Rise of the Tomb Raider           |     1\r\n 2017-11-15 10:06:04.436248+00 | Dead by Daylight                  |     1\r\n 2017-11-15 10:06:04.436248+00 | Hearthstone                       |    12\r\n 2017-11-15 10:06:04.436248+00 | IRL                               |     1\r\n 2017-11-15 10:07:04.402146+00 | Dead by Daylight                  |     1\r\n 2017-11-15 10:07:04.402146+00 | dota 2                            |     1\r\n 2017-11-15 10:07:04.402146+00 | Hearthstone                       |    11\r\n 2017-11-15 10:07:04.402146+00 | IRL                               |     1\r\n 2017-11-15 10:08:04.298688+00 | Dead by Daylight                  |     1\r\n 2017-11-15 10:08:04.298688+00 | dota 2                            |     1\r\n 2017-11-15 10:08:04.298688+00 | Hearthstone                       |    10\r\n 2017-11-15 10:08:04.298688+00 | IRL                               |     1\r\n```\r\n\r\nFor reference, here is the query (a little hair-pulling as it extracts from stored JSON data):\r\n\r\n```sql\r\nselect time, game, count(game) from (\r\n    select \"timestamp\" as time, jsonb_array_elements(\"data\"->'channels')->>'game' as game\r\n    from api_stats\r\n    where $__timeFilter(\"timestamp\")  -- extract(epoch from \"timestamp\") BETWEEN 1510737909 AND 1510824309\r\n    order by \"timestamp\" desc\r\n) e group by e.time, e.game\r\norder by e.time desc;\r\n```\r\n\r\nWhen attempting to push this into a line chart, this results in the following error:\r\n```\r\nValue column must have numeric datatype, column: game type: string value: \r\n```\r\n\r\nGrafana however has no issue dealing with similar queries on InfluxDB when grouping by tag. For example:\r\n\r\n```sql\r\nSELECT count(\"user\") FROM \"plugin_loading_error\" WHERE $timeFilter\r\nGROUP BY time(1h), \"name\", \"version\"\r\nfill(null)\r\n```\r\n"}}
{"actor":{"display_login":"bergquist"}}