{"action":"created","comment":{"url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls/comments/88738812","pull_request_review_id":9306199,"id":88738812,"diff_hunk":"@@ -1 +1,28 @@\n--- insert appointments creating connections between doctors and patients\n+INSERT INTO appointments(app_date, app_time)\n+  SELECT 'August 12, 2016', '10am'\n+  FROM doctors d, patients p\n+  WHERE p.given_name = 'Marsha'\n+  AND p.surname = 'Wilcox'\n+  AND d.given_name = 'Vicky'\n+  AND d.surname = 'Hilton'\n+  UNION\n+  SELECT 'August 17, 2016', '1pm'\n+  FROM doctors d, patients p\n+  WHERE p.given_name = 'Ivory'\n+  AND p.surname = 'Talley'\n+  AND d.given_name = 'Spencer'\n+  AND d.surname = 'Hubbard'\n+  UNION\n+  SELECT 'August 12, 2016', '10am'\n+  FROM doctors d, patients p\n+  WHERE p.given_name = 'Marsha'\n+  AND p.surname = 'Wilcox'\n+  AND d.given_name = 'Spencer'\n+  AND d.surname = 'Hubbard'\n+  UNION\n+  SELECT 'August 17, 2016', '1pm'\n+  FROM doctors d, patients p\n+  WHERE p.given_name = 'Blake'\n+  AND p.surname = 'Hodge'\n+  AND d.given_name = 'Vicky'\n+  AND d.surname = 'Hilton'","path":"scripts/insert_into_appointments.sql","position":29,"original_position":29,"commit_id":"e3d712c144bcb9cd58a7386cb5bb43acf4157616","original_commit_id":"e3d712c144bcb9cd58a7386cb5bb43acf4157616","user":{"login":"neugierige","id":10066657,"avatar_url":"https://avatars.githubusercontent.com/u/10066657?v=3","gravatar_id":"","url":"https://api.github.com/users/neugierige","html_url":"https://github.com/neugierige","followers_url":"https://api.github.com/users/neugierige/followers","following_url":"https://api.github.com/users/neugierige/following{/other_user}","gists_url":"https://api.github.com/users/neugierige/gists{/gist_id}","starred_url":"https://api.github.com/users/neugierige/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neugierige/subscriptions","organizations_url":"https://api.github.com/users/neugierige/orgs","repos_url":"https://api.github.com/users/neugierige/repos","events_url":"https://api.github.com/users/neugierige/events{/privacy}","received_events_url":"https://api.github.com/users/neugierige/received_events","type":"User","site_admin":false},"body":"Close...but no cigar. \r\n\r\n1) you always need a semicolon at the end\r\n2) you also need some commas. look at the code you wrote in class\r\n3) look at your 1st line. What are the parameters you require for inserting into the appointments table? only date and time, for which you provide string literals in the `SELECT` statement. If those fields are all that you require, and you already provide that, then why do you even need to other stuff?? \r\n\r\nTake a look at this solution:\r\n```sql\r\nINSERT INTO appointments(date, time, doctor_id, patient_id)\r\n  SELECT '20150812', '1000',\r\n    (SELECT id FROM doctors WHERE surname = 'Hilton'),\r\n    (SELECT id FROM patients WHERE surname = 'Wilcox')\r\n  UNION\r\n  SELECT '20150817', '1300',\r\n    (SELECT id FROM doctors WHERE surname = 'Hubbard'),\r\n    (SELECT id FROM patients WHERE surname = 'Talley')\r\n  UNION\r\n  SELECT '20150817', '1000',\r\n    (SELECT id FROM doctors WHERE surname = 'Hubbard'),\r\n    (SELECT id FROM patients WHERE surname = 'Wilcox')\r\n  UNION\r\n  SELECT '20150817', '1300',\r\n   (SELECT id FROM doctors WHERE surname = 'Hilton'),\r\n   (SELECT id FROM patients WHERE surname = 'Hodge')\r\n;\r\n```","created_at":"2016-11-18T21:02:28Z","updated_at":"2016-11-18T21:02:28Z","html_url":"https://github.com/ga-wdi-boston/sql-references-diagnostic/pull/141#discussion_r88738812","pull_request_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls/141","_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls/comments/88738812"},"html":{"href":"https://github.com/ga-wdi-boston/sql-references-diagnostic/pull/141#discussion_r88738812"},"pull_request":{"href":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls/141"}}},"pull_request":{"url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls/141","id":94371100,"html_url":"https://github.com/ga-wdi-boston/sql-references-diagnostic/pull/141","diff_url":"https://github.com/ga-wdi-boston/sql-references-diagnostic/pull/141.diff","patch_url":"https://github.com/ga-wdi-boston/sql-references-diagnostic/pull/141.patch","issue_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/issues/141","number":141,"state":"open","locked":false,"title":"Complete Diagnostic","user":{"login":"akradin","id":22475825,"avatar_url":"https://avatars.githubusercontent.com/u/22475825?v=3","gravatar_id":"","url":"https://api.github.com/users/akradin","html_url":"https://github.com/akradin","followers_url":"https://api.github.com/users/akradin/followers","following_url":"https://api.github.com/users/akradin/following{/other_user}","gists_url":"https://api.github.com/users/akradin/gists{/gist_id}","starred_url":"https://api.github.com/users/akradin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akradin/subscriptions","organizations_url":"https://api.github.com/users/akradin/orgs","repos_url":"https://api.github.com/users/akradin/repos","events_url":"https://api.github.com/users/akradin/events{/privacy}","received_events_url":"https://api.github.com/users/akradin/received_events","type":"User","site_admin":false},"body":"Comfort/Clarity on first two: 5\r\nComfort/Clarity on last two: 2\r\nUse my class notes for resources","created_at":"2016-11-18T14:29:41Z","updated_at":"2016-11-18T21:02:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"933885b499d5a0323146b0e510bd2ace1d35a7e2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls/141/commits","review_comments_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls/141/comments","review_comment_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/issues/141/comments","statuses_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/statuses/e3d712c144bcb9cd58a7386cb5bb43acf4157616","head":{"label":"akradin:response","ref":"response","sha":"e3d712c144bcb9cd58a7386cb5bb43acf4157616","user":{"login":"akradin","id":22475825,"avatar_url":"https://avatars.githubusercontent.com/u/22475825?v=3","gravatar_id":"","url":"https://api.github.com/users/akradin","html_url":"https://github.com/akradin","followers_url":"https://api.github.com/users/akradin/followers","following_url":"https://api.github.com/users/akradin/following{/other_user}","gists_url":"https://api.github.com/users/akradin/gists{/gist_id}","starred_url":"https://api.github.com/users/akradin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akradin/subscriptions","organizations_url":"https://api.github.com/users/akradin/orgs","repos_url":"https://api.github.com/users/akradin/repos","events_url":"https://api.github.com/users/akradin/events{/privacy}","received_events_url":"https://api.github.com/users/akradin/received_events","type":"User","site_admin":false},"repo":{"id":74134465,"name":"sql-references-diagnostic","full_name":"akradin/sql-references-diagnostic","owner":{"login":"akradin","id":22475825,"avatar_url":"https://avatars.githubusercontent.com/u/22475825?v=3","gravatar_id":"","url":"https://api.github.com/users/akradin","html_url":"https://github.com/akradin","followers_url":"https://api.github.com/users/akradin/followers","following_url":"https://api.github.com/users/akradin/following{/other_user}","gists_url":"https://api.github.com/users/akradin/gists{/gist_id}","starred_url":"https://api.github.com/users/akradin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akradin/subscriptions","organizations_url":"https://api.github.com/users/akradin/orgs","repos_url":"https://api.github.com/users/akradin/repos","events_url":"https://api.github.com/users/akradin/events{/privacy}","received_events_url":"https://api.github.com/users/akradin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akradin/sql-references-diagnostic","description":"Diagnostic covering foreign keys and join tables in PostgreSQL","fork":true,"url":"https://api.github.com/repos/akradin/sql-references-diagnostic","forks_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/forks","keys_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/teams","hooks_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/hooks","issue_events_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/issues/events{/number}","events_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/events","assignees_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/assignees{/user}","branches_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/branches{/branch}","tags_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/tags","blobs_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/git/refs{/sha}","trees_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/statuses/{sha}","languages_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/languages","stargazers_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/stargazers","contributors_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/contributors","subscribers_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/subscribers","subscription_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/subscription","commits_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/commits{/sha}","git_commits_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/git/commits{/sha}","comments_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/comments{/number}","issue_comment_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/issues/comments{/number}","contents_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/contents/{+path}","compare_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/merges","archive_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/downloads","issues_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/issues{/number}","pulls_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/pulls{/number}","milestones_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/milestones{/number}","notifications_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/labels{/name}","releases_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/releases{/id}","deployments_url":"https://api.github.com/repos/akradin/sql-references-diagnostic/deployments","created_at":"2016-11-18T14:00:34Z","updated_at":"2016-11-18T13:27:18Z","pushed_at":"2016-11-18T14:29:30Z","git_url":"git://github.com/akradin/sql-references-diagnostic.git","ssh_url":"git@github.com:akradin/sql-references-diagnostic.git","clone_url":"https://github.com/akradin/sql-references-diagnostic.git","svn_url":"https://github.com/akradin/sql-references-diagnostic","homepage":"","size":29,"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":"ga-wdi-boston:master","ref":"master","sha":"b5a3fe22676b28a6556e0e8b305b6174d542bb41","user":{"login":"ga-wdi-boston","id":6361298,"avatar_url":"https://avatars.githubusercontent.com/u/6361298?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-boston","html_url":"https://github.com/ga-wdi-boston","followers_url":"https://api.github.com/users/ga-wdi-boston/followers","following_url":"https://api.github.com/users/ga-wdi-boston/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-boston/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-boston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-boston/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-boston/orgs","repos_url":"https://api.github.com/users/ga-wdi-boston/repos","events_url":"https://api.github.com/users/ga-wdi-boston/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-boston/received_events","type":"Organization","site_admin":false},"repo":{"id":39835743,"name":"sql-references-diagnostic","full_name":"ga-wdi-boston/sql-references-diagnostic","owner":{"login":"ga-wdi-boston","id":6361298,"avatar_url":"https://avatars.githubusercontent.com/u/6361298?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-boston","html_url":"https://github.com/ga-wdi-boston","followers_url":"https://api.github.com/users/ga-wdi-boston/followers","following_url":"https://api.github.com/users/ga-wdi-boston/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-boston/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-boston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-boston/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-boston/orgs","repos_url":"https://api.github.com/users/ga-wdi-boston/repos","events_url":"https://api.github.com/users/ga-wdi-boston/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-boston/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-wdi-boston/sql-references-diagnostic","description":"Diagnostic covering foreign keys and join tables in PostgreSQL","fork":false,"url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic","forks_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/forks","keys_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/teams","hooks_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/hooks","issue_events_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/issues/events{/number}","events_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/events","assignees_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/assignees{/user}","branches_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/branches{/branch}","tags_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/tags","blobs_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/languages","stargazers_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/stargazers","contributors_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/contributors","subscribers_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/subscribers","subscription_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/subscription","commits_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/contents/{+path}","compare_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/merges","archive_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/downloads","issues_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/issues{/number}","pulls_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/labels{/name}","releases_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/releases{/id}","deployments_url":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/deployments","created_at":"2015-07-28T13:33:44Z","updated_at":"2016-11-18T13:27:18Z","pushed_at":"2016-11-18T14:38:24Z","git_url":"git://github.com/ga-wdi-boston/sql-references-diagnostic.git","ssh_url":"git@github.com:ga-wdi-boston/sql-references-diagnostic.git","clone_url":"https://github.com/ga-wdi-boston/sql-references-diagnostic.git","svn_url":"https://github.com/ga-wdi-boston/sql-references-diagnostic","homepage":"","size":210,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":136,"mirror_url":null,"open_issues_count":23,"forks":136,"open_issues":23,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls/141"},"html":{"href":"https://github.com/ga-wdi-boston/sql-references-diagnostic/pull/141"},"issue":{"href":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/issues/141"},"comments":{"href":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/issues/141/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls/141/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/pulls/141/commits"},"statuses":{"href":"https://api.github.com/repos/ga-wdi-boston/sql-references-diagnostic/statuses/e3d712c144bcb9cd58a7386cb5bb43acf4157616"}}}}
{"actor":{"display_login":"neugierige"}}