{"action":"created","issue":{"url":"https://api.github.com/repos/slamdata/slamengine/issues/620","labels_url":"https://api.github.com/repos/slamdata/slamengine/issues/620/labels{/name}","comments_url":"https://api.github.com/repos/slamdata/slamengine/issues/620/comments","events_url":"https://api.github.com/repos/slamdata/slamengine/issues/620/events","html_url":"https://github.com/slamdata/slamengine/issues/620","id":57959559,"number":620,"title":"plannr: issue when grouping by array element","user":{"login":"jdegoes","id":156745,"avatar_url":"https://avatars.githubusercontent.com/u/156745?v=3","gravatar_id":"","url":"https://api.github.com/users/jdegoes","html_url":"https://github.com/jdegoes","followers_url":"https://api.github.com/users/jdegoes/followers","following_url":"https://api.github.com/users/jdegoes/following{/other_user}","gists_url":"https://api.github.com/users/jdegoes/gists{/gist_id}","starred_url":"https://api.github.com/users/jdegoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdegoes/subscriptions","organizations_url":"https://api.github.com/users/jdegoes/orgs","repos_url":"https://api.github.com/users/jdegoes/repos","events_url":"https://api.github.com/users/jdegoes/events{/privacy}","received_events_url":"https://api.github.com/users/jdegoes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/slamdata/slamengine/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/slamdata/slamengine/labels/ready","name":"ready","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"sellout","id":33031,"avatar_url":"https://avatars.githubusercontent.com/u/33031?v=3","gravatar_id":"","url":"https://api.github.com/users/sellout","html_url":"https://github.com/sellout","followers_url":"https://api.github.com/users/sellout/followers","following_url":"https://api.github.com/users/sellout/following{/other_user}","gists_url":"https://api.github.com/users/sellout/gists{/gist_id}","starred_url":"https://api.github.com/users/sellout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sellout/subscriptions","organizations_url":"https://api.github.com/users/sellout/orgs","repos_url":"https://api.github.com/users/sellout/repos","events_url":"https://api.github.com/users/sellout/events{/privacy}","received_events_url":"https://api.github.com/users/sellout/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/slamdata/slamengine/milestones/6","labels_url":"https://api.github.com/repos/slamdata/slamengine/milestones/6/labels","id":839374,"number":6,"title":"1.3","description":"","creator":{"login":"jdegoes","id":156745,"avatar_url":"https://avatars.githubusercontent.com/u/156745?v=3","gravatar_id":"","url":"https://api.github.com/users/jdegoes","html_url":"https://github.com/jdegoes","followers_url":"https://api.github.com/users/jdegoes/followers","following_url":"https://api.github.com/users/jdegoes/following{/other_user}","gists_url":"https://api.github.com/users/jdegoes/gists{/gist_id}","starred_url":"https://api.github.com/users/jdegoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdegoes/subscriptions","organizations_url":"https://api.github.com/users/jdegoes/orgs","repos_url":"https://api.github.com/users/jdegoes/repos","events_url":"https://api.github.com/users/jdegoes/events{/privacy}","received_events_url":"https://api.github.com/users/jdegoes/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":15,"state":"open","created_at":"2014-10-24T18:33:05Z","updated_at":"2015-02-17T18:07:21Z","due_on":"2015-03-02T07:00:00Z","closed_at":null},"comments":12,"created_at":"2015-02-17T18:07:21Z","updated_at":"2015-02-17T20:47:59Z","closed_at":null,"body":"See [here](https://slamdata.supportbee.com/tickets/4527614) for context.\r\n\r\n### Original Query w/Incorrect Results\r\n\r\n```sql\r\nSELECT DISTINCT events[0].type, COUNT(events[0].type) AS count\r\nFROM “/test/usage”\r\nGROUP BY events[0].type\r\n```\r\n\r\n------------------------------\r\n\r\n```\r\n2235       headUnitConnect\r\n\r\n2235       headUnitDisconnect\r\n\r\n2235       appEvent\r\n```\r\n\r\n### Alternate Queries w/Correct Results\r\n\r\n```sql\r\nSELECT COUNT(events[0].type) AS count\r\nFROM \"/preprod/app_usg\"\r\nWHERE events[0].type = 'appEvent'\r\n```\r\n\r\n```sql\r\nSELECT COUNT(events[0].type) AS count\r\nFROM \"/preprod/app_usg\"\r\nWHERE events[0].type = 'headunitDisconnect'\r\n``` \r\n\r\n```sql\r\nSELECT COUNT(events[0].type) AS count\r\nFROM \"/preprod/app_usg\"\r\nWHERE events[0].type = 'headUnitConnect\"\r\n```\r\n\r\n------------------------------\r\n\r\n```\r\n200       appEvent\r\n1350      headUnitDisconnect\r\n685       headUnitConnect\r\n```"},"comment":{"url":"https://api.github.com/repos/slamdata/slamengine/issues/comments/74750007","html_url":"https://github.com/slamdata/slamengine/issues/620#issuecomment-74750007","issue_url":"https://api.github.com/repos/slamdata/slamengine/issues/620","id":74750007,"user":{"login":"jdegoes","id":156745,"avatar_url":"https://avatars.githubusercontent.com/u/156745?v=3","gravatar_id":"","url":"https://api.github.com/users/jdegoes","html_url":"https://github.com/jdegoes","followers_url":"https://api.github.com/users/jdegoes/followers","following_url":"https://api.github.com/users/jdegoes/following{/other_user}","gists_url":"https://api.github.com/users/jdegoes/gists{/gist_id}","starred_url":"https://api.github.com/users/jdegoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdegoes/subscriptions","organizations_url":"https://api.github.com/users/jdegoes/orgs","repos_url":"https://api.github.com/users/jdegoes/repos","events_url":"https://api.github.com/users/jdegoes/events{/privacy}","received_events_url":"https://api.github.com/users/jdegoes/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T20:47:59Z","updated_at":"2015-02-17T20:47:59Z","body":"I'll cut a new release after you get this in, BTW, and update the user appropriately."}}