{"action":"created","comment":{"url":"https://api.github.com/repos/GKuChan/newbieTraining/pulls/comments/33322297","id":33322297,"diff_hunk":"@@ -0,0 +1,45 @@\n+--\n+-- 工作时间最长的雇员的信息\n+--\n+SELECT * FROM departments AS d,\n+\t\t\t  dept_emp AS de,\n+\t\t\t  dept_manager AS dm,\n+\t\t\t  employees AS e,\n+\t\t\t  salaries AS s,\n+\t\t\t  titles AS t,\n+\t\t\t  v_full_departments AS vfd,\n+\t\t\t  v_full_employees AS vfe \n+WHERE   d.dept_no=de.dept_no\n+\t    AND de.emp_no=e.emp_no\n+\t    AND dm.emp_no=e.emp_no\n+\t    AND e.emp_no IN(SELECT emp_no FROM employees WHERE hire_date=(SELECT MIN(hire_date) FROM employees))\n+\t    AND s.emp_no=e.emp_no\n+\t    AND t.emp_no=e.emp_no\n+\t    AND vfd.dept_no=dm.dept_no\n+\t    AND vfe.emp_no=de.emp_no;","path":"task2/samhou.sql","position":19,"original_position":19,"commit_id":"b0b56f81f56567266ab746aaa3f42087ac70afc6","original_commit_id":"b0b56f81f56567266ab746aaa3f42087ac70afc6","user":{"login":"GKuChan","id":5866643,"avatar_url":"https://avatars.githubusercontent.com/u/5866643?v=3","gravatar_id":"","url":"https://api.github.com/users/GKuChan","html_url":"https://github.com/GKuChan","followers_url":"https://api.github.com/users/GKuChan/followers","following_url":"https://api.github.com/users/GKuChan/following{/other_user}","gists_url":"https://api.github.com/users/GKuChan/gists{/gist_id}","starred_url":"https://api.github.com/users/GKuChan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GKuChan/subscriptions","organizations_url":"https://api.github.com/users/GKuChan/orgs","repos_url":"https://api.github.com/users/GKuChan/repos","events_url":"https://api.github.com/users/GKuChan/events{/privacy}","received_events_url":"https://api.github.com/users/GKuChan/received_events","type":"User","site_admin":false},"body":"这样的写法效率很低，多使用join。","created_at":"2015-06-26T01:31:10Z","updated_at":"2015-06-26T01:31:10Z","html_url":"https://github.com/GKuChan/newbieTraining/pull/65#discussion_r33322297","pull_request_url":"https://api.github.com/repos/GKuChan/newbieTraining/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/GKuChan/newbieTraining/pulls/comments/33322297"},"html":{"href":"https://github.com/GKuChan/newbieTraining/pull/65#discussion_r33322297"},"pull_request":{"href":"https://api.github.com/repos/GKuChan/newbieTraining/pulls/65"}}},"pull_request":{"url":"https://api.github.com/repos/GKuChan/newbieTraining/pulls/65","id":38327610,"html_url":"https://github.com/GKuChan/newbieTraining/pull/65","diff_url":"https://github.com/GKuChan/newbieTraining/pull/65.diff","patch_url":"https://github.com/GKuChan/newbieTraining/pull/65.patch","issue_url":"https://api.github.com/repos/GKuChan/newbieTraining/issues/65","number":65,"state":"open","locked":false,"title":"Task2","user":{"login":"smahou","id":10609822,"avatar_url":"https://avatars.githubusercontent.com/u/10609822?v=3","gravatar_id":"","url":"https://api.github.com/users/smahou","html_url":"https://github.com/smahou","followers_url":"https://api.github.com/users/smahou/followers","following_url":"https://api.github.com/users/smahou/following{/other_user}","gists_url":"https://api.github.com/users/smahou/gists{/gist_id}","starred_url":"https://api.github.com/users/smahou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smahou/subscriptions","organizations_url":"https://api.github.com/users/smahou/orgs","repos_url":"https://api.github.com/users/smahou/repos","events_url":"https://api.github.com/users/smahou/events{/privacy}","received_events_url":"https://api.github.com/users/smahou/received_events","type":"User","site_admin":false},"body":"task2 commit","created_at":"2015-06-23T11:47:42Z","updated_at":"2015-06-26T01:31:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26c23cf7bdef6050f789ae052f5abf3c75dab7a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GKuChan/newbieTraining/pulls/65/commits","review_comments_url":"https://api.github.com/repos/GKuChan/newbieTraining/pulls/65/comments","review_comment_url":"https://api.github.com/repos/GKuChan/newbieTraining/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GKuChan/newbieTraining/issues/65/comments","statuses_url":"https://api.github.com/repos/GKuChan/newbieTraining/statuses/b0b56f81f56567266ab746aaa3f42087ac70afc6","head":{"label":"smahou:newbranch","ref":"newbranch","sha":"b0b56f81f56567266ab746aaa3f42087ac70afc6","user":{"login":"smahou","id":10609822,"avatar_url":"https://avatars.githubusercontent.com/u/10609822?v=3","gravatar_id":"","url":"https://api.github.com/users/smahou","html_url":"https://github.com/smahou","followers_url":"https://api.github.com/users/smahou/followers","following_url":"https://api.github.com/users/smahou/following{/other_user}","gists_url":"https://api.github.com/users/smahou/gists{/gist_id}","starred_url":"https://api.github.com/users/smahou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smahou/subscriptions","organizations_url":"https://api.github.com/users/smahou/orgs","repos_url":"https://api.github.com/users/smahou/repos","events_url":"https://api.github.com/users/smahou/events{/privacy}","received_events_url":"https://api.github.com/users/smahou/received_events","type":"User","site_admin":false},"repo":{"id":37808143,"name":"newbieTraining","full_name":"smahou/newbieTraining","owner":{"login":"smahou","id":10609822,"avatar_url":"https://avatars.githubusercontent.com/u/10609822?v=3","gravatar_id":"","url":"https://api.github.com/users/smahou","html_url":"https://github.com/smahou","followers_url":"https://api.github.com/users/smahou/followers","following_url":"https://api.github.com/users/smahou/following{/other_user}","gists_url":"https://api.github.com/users/smahou/gists{/gist_id}","starred_url":"https://api.github.com/users/smahou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smahou/subscriptions","organizations_url":"https://api.github.com/users/smahou/orgs","repos_url":"https://api.github.com/users/smahou/repos","events_url":"https://api.github.com/users/smahou/events{/privacy}","received_events_url":"https://api.github.com/users/smahou/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smahou/newbieTraining","description":"The Newbie Training For Some Cool Guys","fork":true,"url":"https://api.github.com/repos/smahou/newbieTraining","forks_url":"https://api.github.com/repos/smahou/newbieTraining/forks","keys_url":"https://api.github.com/repos/smahou/newbieTraining/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smahou/newbieTraining/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smahou/newbieTraining/teams","hooks_url":"https://api.github.com/repos/smahou/newbieTraining/hooks","issue_events_url":"https://api.github.com/repos/smahou/newbieTraining/issues/events{/number}","events_url":"https://api.github.com/repos/smahou/newbieTraining/events","assignees_url":"https://api.github.com/repos/smahou/newbieTraining/assignees{/user}","branches_url":"https://api.github.com/repos/smahou/newbieTraining/branches{/branch}","tags_url":"https://api.github.com/repos/smahou/newbieTraining/tags","blobs_url":"https://api.github.com/repos/smahou/newbieTraining/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smahou/newbieTraining/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smahou/newbieTraining/git/refs{/sha}","trees_url":"https://api.github.com/repos/smahou/newbieTraining/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smahou/newbieTraining/statuses/{sha}","languages_url":"https://api.github.com/repos/smahou/newbieTraining/languages","stargazers_url":"https://api.github.com/repos/smahou/newbieTraining/stargazers","contributors_url":"https://api.github.com/repos/smahou/newbieTraining/contributors","subscribers_url":"https://api.github.com/repos/smahou/newbieTraining/subscribers","subscription_url":"https://api.github.com/repos/smahou/newbieTraining/subscription","commits_url":"https://api.github.com/repos/smahou/newbieTraining/commits{/sha}","git_commits_url":"https://api.github.com/repos/smahou/newbieTraining/git/commits{/sha}","comments_url":"https://api.github.com/repos/smahou/newbieTraining/comments{/number}","issue_comment_url":"https://api.github.com/repos/smahou/newbieTraining/issues/comments{/number}","contents_url":"https://api.github.com/repos/smahou/newbieTraining/contents/{+path}","compare_url":"https://api.github.com/repos/smahou/newbieTraining/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smahou/newbieTraining/merges","archive_url":"https://api.github.com/repos/smahou/newbieTraining/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smahou/newbieTraining/downloads","issues_url":"https://api.github.com/repos/smahou/newbieTraining/issues{/number}","pulls_url":"https://api.github.com/repos/smahou/newbieTraining/pulls{/number}","milestones_url":"https://api.github.com/repos/smahou/newbieTraining/milestones{/number}","notifications_url":"https://api.github.com/repos/smahou/newbieTraining/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smahou/newbieTraining/labels{/name}","releases_url":"https://api.github.com/repos/smahou/newbieTraining/releases{/id}","created_at":"2015-06-21T12:30:42Z","updated_at":"2015-06-21T12:22:31Z","pushed_at":"2015-06-23T11:47:27Z","git_url":"git://github.com/smahou/newbieTraining.git","ssh_url":"git@github.com:smahou/newbieTraining.git","clone_url":"https://github.com/smahou/newbieTraining.git","svn_url":"https://github.com/smahou/newbieTraining","homepage":"","size":138,"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":"GKuChan:master","ref":"master","sha":"3bfa6926f0fa70be852e824dd4dbdb5ab9a05fd8","user":{"login":"GKuChan","id":5866643,"avatar_url":"https://avatars.githubusercontent.com/u/5866643?v=3","gravatar_id":"","url":"https://api.github.com/users/GKuChan","html_url":"https://github.com/GKuChan","followers_url":"https://api.github.com/users/GKuChan/followers","following_url":"https://api.github.com/users/GKuChan/following{/other_user}","gists_url":"https://api.github.com/users/GKuChan/gists{/gist_id}","starred_url":"https://api.github.com/users/GKuChan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GKuChan/subscriptions","organizations_url":"https://api.github.com/users/GKuChan/orgs","repos_url":"https://api.github.com/users/GKuChan/repos","events_url":"https://api.github.com/users/GKuChan/events{/privacy}","received_events_url":"https://api.github.com/users/GKuChan/received_events","type":"User","site_admin":false},"repo":{"id":37538201,"name":"newbieTraining","full_name":"GKuChan/newbieTraining","owner":{"login":"GKuChan","id":5866643,"avatar_url":"https://avatars.githubusercontent.com/u/5866643?v=3","gravatar_id":"","url":"https://api.github.com/users/GKuChan","html_url":"https://github.com/GKuChan","followers_url":"https://api.github.com/users/GKuChan/followers","following_url":"https://api.github.com/users/GKuChan/following{/other_user}","gists_url":"https://api.github.com/users/GKuChan/gists{/gist_id}","starred_url":"https://api.github.com/users/GKuChan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GKuChan/subscriptions","organizations_url":"https://api.github.com/users/GKuChan/orgs","repos_url":"https://api.github.com/users/GKuChan/repos","events_url":"https://api.github.com/users/GKuChan/events{/privacy}","received_events_url":"https://api.github.com/users/GKuChan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GKuChan/newbieTraining","description":"The Newbie Training For Some Cool Guys","fork":false,"url":"https://api.github.com/repos/GKuChan/newbieTraining","forks_url":"https://api.github.com/repos/GKuChan/newbieTraining/forks","keys_url":"https://api.github.com/repos/GKuChan/newbieTraining/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GKuChan/newbieTraining/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GKuChan/newbieTraining/teams","hooks_url":"https://api.github.com/repos/GKuChan/newbieTraining/hooks","issue_events_url":"https://api.github.com/repos/GKuChan/newbieTraining/issues/events{/number}","events_url":"https://api.github.com/repos/GKuChan/newbieTraining/events","assignees_url":"https://api.github.com/repos/GKuChan/newbieTraining/assignees{/user}","branches_url":"https://api.github.com/repos/GKuChan/newbieTraining/branches{/branch}","tags_url":"https://api.github.com/repos/GKuChan/newbieTraining/tags","blobs_url":"https://api.github.com/repos/GKuChan/newbieTraining/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GKuChan/newbieTraining/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GKuChan/newbieTraining/git/refs{/sha}","trees_url":"https://api.github.com/repos/GKuChan/newbieTraining/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GKuChan/newbieTraining/statuses/{sha}","languages_url":"https://api.github.com/repos/GKuChan/newbieTraining/languages","stargazers_url":"https://api.github.com/repos/GKuChan/newbieTraining/stargazers","contributors_url":"https://api.github.com/repos/GKuChan/newbieTraining/contributors","subscribers_url":"https://api.github.com/repos/GKuChan/newbieTraining/subscribers","subscription_url":"https://api.github.com/repos/GKuChan/newbieTraining/subscription","commits_url":"https://api.github.com/repos/GKuChan/newbieTraining/commits{/sha}","git_commits_url":"https://api.github.com/repos/GKuChan/newbieTraining/git/commits{/sha}","comments_url":"https://api.github.com/repos/GKuChan/newbieTraining/comments{/number}","issue_comment_url":"https://api.github.com/repos/GKuChan/newbieTraining/issues/comments{/number}","contents_url":"https://api.github.com/repos/GKuChan/newbieTraining/contents/{+path}","compare_url":"https://api.github.com/repos/GKuChan/newbieTraining/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GKuChan/newbieTraining/merges","archive_url":"https://api.github.com/repos/GKuChan/newbieTraining/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GKuChan/newbieTraining/downloads","issues_url":"https://api.github.com/repos/GKuChan/newbieTraining/issues{/number}","pulls_url":"https://api.github.com/repos/GKuChan/newbieTraining/pulls{/number}","milestones_url":"https://api.github.com/repos/GKuChan/newbieTraining/milestones{/number}","notifications_url":"https://api.github.com/repos/GKuChan/newbieTraining/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GKuChan/newbieTraining/labels{/name}","releases_url":"https://api.github.com/repos/GKuChan/newbieTraining/releases{/id}","created_at":"2015-06-16T15:18:29Z","updated_at":"2015-06-24T10:55:50Z","pushed_at":"2015-06-26T01:29:01Z","git_url":"git://github.com/GKuChan/newbieTraining.git","ssh_url":"git@github.com:GKuChan/newbieTraining.git","clone_url":"https://github.com/GKuChan/newbieTraining.git","svn_url":"https://github.com/GKuChan/newbieTraining","homepage":"","size":1027,"stargazers_count":96,"watchers_count":96,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":4,"forks":62,"open_issues":4,"watchers":96,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GKuChan/newbieTraining/pulls/65"},"html":{"href":"https://github.com/GKuChan/newbieTraining/pull/65"},"issue":{"href":"https://api.github.com/repos/GKuChan/newbieTraining/issues/65"},"comments":{"href":"https://api.github.com/repos/GKuChan/newbieTraining/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/GKuChan/newbieTraining/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/GKuChan/newbieTraining/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GKuChan/newbieTraining/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/GKuChan/newbieTraining/statuses/b0b56f81f56567266ab746aaa3f42087ac70afc6"}}}}