{"action":"created","comment":{"url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls/comments/76499171","id":76499171,"diff_hunk":"@@ -0,0 +1,19 @@\n+SELECT\n+  u.id,\n+  u.canvas_id,\n+  u.name,\n+  u.sortable_name,\n+  c.id,\n+  c.name,\n+  c.code,\n+  AVG(sf.score)\n+FROM enrollment_dim e\n+INNER JOIN course_dim c ON e.course_id = c.id\n+INNER JOIN assignment_dim a ON c.id = a.course_id\n+INNER JOIN submission_fact sf ON a.id = sf.assignment_id AND e.user_id = sf.user_id\n+INNER JOIN user_dim u ON sf.user_id = u.id","path":"queries/scores/GrabAverageScore.sql","position":14,"original_position":14,"commit_id":"11aeac1c2b79c483e0b5a2eceadc37cd92f587d0","original_commit_id":"11aeac1c2b79c483e0b5a2eceadc37cd92f587d0","user":{"login":"mattsmith123","id":1251402,"avatar_url":"https://avatars.githubusercontent.com/u/1251402?v=3","gravatar_id":"","url":"https://api.github.com/users/mattsmith123","html_url":"https://github.com/mattsmith123","followers_url":"https://api.github.com/users/mattsmith123/followers","following_url":"https://api.github.com/users/mattsmith123/following{/other_user}","gists_url":"https://api.github.com/users/mattsmith123/gists{/gist_id}","starred_url":"https://api.github.com/users/mattsmith123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattsmith123/subscriptions","organizations_url":"https://api.github.com/users/mattsmith123/orgs","repos_url":"https://api.github.com/users/mattsmith123/repos","events_url":"https://api.github.com/users/mattsmith123/events{/privacy}","received_events_url":"https://api.github.com/users/mattsmith123/received_events","type":"User","site_admin":false},"body":"this should join to the enrollments user_id so users will always join (eventually) to the full set of assignments they are accountable for.","created_at":"2016-08-26T22:49:55Z","updated_at":"2016-08-26T22:49:55Z","html_url":"https://github.com/instructure/canvas-hosted-data-examples/pull/2#discussion_r76499171","pull_request_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls/comments/76499171"},"html":{"href":"https://github.com/instructure/canvas-hosted-data-examples/pull/2#discussion_r76499171"},"pull_request":{"href":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls/2","id":74372813,"html_url":"https://github.com/instructure/canvas-hosted-data-examples/pull/2","diff_url":"https://github.com/instructure/canvas-hosted-data-examples/pull/2.diff","patch_url":"https://github.com/instructure/canvas-hosted-data-examples/pull/2.patch","issue_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/issues/2","number":2,"state":"open","locked":false,"title":"adds in enrollment/score queries","user":{"login":"SecurityInsanity","id":7262714,"avatar_url":"https://avatars.githubusercontent.com/u/7262714?v=3","gravatar_id":"","url":"https://api.github.com/users/SecurityInsanity","html_url":"https://github.com/SecurityInsanity","followers_url":"https://api.github.com/users/SecurityInsanity/followers","following_url":"https://api.github.com/users/SecurityInsanity/following{/other_user}","gists_url":"https://api.github.com/users/SecurityInsanity/gists{/gist_id}","starred_url":"https://api.github.com/users/SecurityInsanity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SecurityInsanity/subscriptions","organizations_url":"https://api.github.com/users/SecurityInsanity/orgs","repos_url":"https://api.github.com/users/SecurityInsanity/repos","events_url":"https://api.github.com/users/SecurityInsanity/events{/privacy}","received_events_url":"https://api.github.com/users/SecurityInsanity/received_events","type":"User","site_admin":false},"body":"this adds in some basic queries for enrollments/scores. things such\r\nas an average score for a course, any \"low\" scores a student has,\r\nany scores that are 0 for a student.\r\n\r\nas well as some super basic enrollment queries such as how many\r\nstudent enrollments a particular student has, or how many active\r\nenrollments someone currently has.","created_at":"2016-06-19T20:12:21Z","updated_at":"2016-08-26T22:49:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"760ca4a8e7c06f55eca7cc310e61e2d877740a87","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls/2/commits","review_comments_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls/2/comments","review_comment_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/issues/2/comments","statuses_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/statuses/11aeac1c2b79c483e0b5a2eceadc37cd92f587d0","head":{"label":"SecurityInsanity:master","ref":"master","sha":"11aeac1c2b79c483e0b5a2eceadc37cd92f587d0","user":{"login":"SecurityInsanity","id":7262714,"avatar_url":"https://avatars.githubusercontent.com/u/7262714?v=3","gravatar_id":"","url":"https://api.github.com/users/SecurityInsanity","html_url":"https://github.com/SecurityInsanity","followers_url":"https://api.github.com/users/SecurityInsanity/followers","following_url":"https://api.github.com/users/SecurityInsanity/following{/other_user}","gists_url":"https://api.github.com/users/SecurityInsanity/gists{/gist_id}","starred_url":"https://api.github.com/users/SecurityInsanity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SecurityInsanity/subscriptions","organizations_url":"https://api.github.com/users/SecurityInsanity/orgs","repos_url":"https://api.github.com/users/SecurityInsanity/repos","events_url":"https://api.github.com/users/SecurityInsanity/events{/privacy}","received_events_url":"https://api.github.com/users/SecurityInsanity/received_events","type":"User","site_admin":false},"repo":{"id":60171471,"name":"canvas-hosted-data-examples","full_name":"SecurityInsanity/canvas-hosted-data-examples","owner":{"login":"SecurityInsanity","id":7262714,"avatar_url":"https://avatars.githubusercontent.com/u/7262714?v=3","gravatar_id":"","url":"https://api.github.com/users/SecurityInsanity","html_url":"https://github.com/SecurityInsanity","followers_url":"https://api.github.com/users/SecurityInsanity/followers","following_url":"https://api.github.com/users/SecurityInsanity/following{/other_user}","gists_url":"https://api.github.com/users/SecurityInsanity/gists{/gist_id}","starred_url":"https://api.github.com/users/SecurityInsanity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SecurityInsanity/subscriptions","organizations_url":"https://api.github.com/users/SecurityInsanity/orgs","repos_url":"https://api.github.com/users/SecurityInsanity/repos","events_url":"https://api.github.com/users/SecurityInsanity/events{/privacy}","received_events_url":"https://api.github.com/users/SecurityInsanity/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SecurityInsanity/canvas-hosted-data-examples","description":"Collection of examples that use Canvas Hosted Data to answer questions.","fork":true,"url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples","forks_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/forks","keys_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/teams","hooks_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/hooks","issue_events_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/issues/events{/number}","events_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/events","assignees_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/assignees{/user}","branches_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/branches{/branch}","tags_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/tags","blobs_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/statuses/{sha}","languages_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/languages","stargazers_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/stargazers","contributors_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/contributors","subscribers_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/subscribers","subscription_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/subscription","commits_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/contents/{+path}","compare_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/merges","archive_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/downloads","issues_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/issues{/number}","pulls_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/pulls{/number}","milestones_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/milestones{/number}","notifications_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/labels{/name}","releases_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/releases{/id}","deployments_url":"https://api.github.com/repos/SecurityInsanity/canvas-hosted-data-examples/deployments","created_at":"2016-06-01T11:34:30Z","updated_at":"2016-01-02T10:18:40Z","pushed_at":"2016-08-20T09:00:06Z","git_url":"git://github.com/SecurityInsanity/canvas-hosted-data-examples.git","ssh_url":"git@github.com:SecurityInsanity/canvas-hosted-data-examples.git","clone_url":"https://github.com/SecurityInsanity/canvas-hosted-data-examples.git","svn_url":"https://github.com/SecurityInsanity/canvas-hosted-data-examples","homepage":"","size":9,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"instructure:master","ref":"master","sha":"faedab14902c36134465b1694142aa99d28dd093","user":{"login":"instructure","id":515326,"avatar_url":"https://avatars.githubusercontent.com/u/515326?v=3","gravatar_id":"","url":"https://api.github.com/users/instructure","html_url":"https://github.com/instructure","followers_url":"https://api.github.com/users/instructure/followers","following_url":"https://api.github.com/users/instructure/following{/other_user}","gists_url":"https://api.github.com/users/instructure/gists{/gist_id}","starred_url":"https://api.github.com/users/instructure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instructure/subscriptions","organizations_url":"https://api.github.com/users/instructure/orgs","repos_url":"https://api.github.com/users/instructure/repos","events_url":"https://api.github.com/users/instructure/events{/privacy}","received_events_url":"https://api.github.com/users/instructure/received_events","type":"Organization","site_admin":false},"repo":{"id":34269367,"name":"canvas-hosted-data-examples","full_name":"instructure/canvas-hosted-data-examples","owner":{"login":"instructure","id":515326,"avatar_url":"https://avatars.githubusercontent.com/u/515326?v=3","gravatar_id":"","url":"https://api.github.com/users/instructure","html_url":"https://github.com/instructure","followers_url":"https://api.github.com/users/instructure/followers","following_url":"https://api.github.com/users/instructure/following{/other_user}","gists_url":"https://api.github.com/users/instructure/gists{/gist_id}","starred_url":"https://api.github.com/users/instructure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/instructure/subscriptions","organizations_url":"https://api.github.com/users/instructure/orgs","repos_url":"https://api.github.com/users/instructure/repos","events_url":"https://api.github.com/users/instructure/events{/privacy}","received_events_url":"https://api.github.com/users/instructure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/instructure/canvas-hosted-data-examples","description":"Collection of examples that use Canvas Hosted Data to answer questions.","fork":false,"url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples","forks_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/forks","keys_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/teams","hooks_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/hooks","issue_events_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/issues/events{/number}","events_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/events","assignees_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/assignees{/user}","branches_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/branches{/branch}","tags_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/tags","blobs_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/statuses/{sha}","languages_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/languages","stargazers_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/stargazers","contributors_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/contributors","subscribers_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/subscribers","subscription_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/subscription","commits_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/contents/{+path}","compare_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/merges","archive_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/downloads","issues_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/issues{/number}","pulls_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls{/number}","milestones_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/milestones{/number}","notifications_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/labels{/name}","releases_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/releases{/id}","deployments_url":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/deployments","created_at":"2015-04-20T15:38:24Z","updated_at":"2016-07-19T15:56:45Z","pushed_at":"2016-08-20T09:00:32Z","git_url":"git://github.com/instructure/canvas-hosted-data-examples.git","ssh_url":"git@github.com:instructure/canvas-hosted-data-examples.git","clone_url":"https://github.com/instructure/canvas-hosted-data-examples.git","svn_url":"https://github.com/instructure/canvas-hosted-data-examples","homepage":"","size":6,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls/2"},"html":{"href":"https://github.com/instructure/canvas-hosted-data-examples/pull/2"},"issue":{"href":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/issues/2"},"comments":{"href":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/instructure/canvas-hosted-data-examples/statuses/11aeac1c2b79c483e0b5a2eceadc37cd92f587d0"}}}}
{"actor":{"display_login":"mattsmith123"}}