{"action":"created","comment":{"url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls/comments/42747035","id":42747035,"diff_hunk":"@@ -1 +1,318 @@\n-# sql-joins\n+# SQL Joins\n+\n+## Objectives\n+\n+1. Define SQL joins and understand when and why to use them.\n+2. Define the different types of SQL joins: inner, outer, left outer, right outer\n+3. Practice writing join statements. \n+\n+## What Is a JOIN?\n+\n+A SQL JOIN clause is a way to combine rows from two or more tables, based on a common column between them. The great thing about relational databases is that they are just that––*relational*. Relational databases allow us not only to store data that is interconnected, but to retrieve that data in ways that reflect that interconnectivity. \n+\n+Let's say, for example, we have two tables, a Cats table and an Owners table. Cats and owners are associated by a foreign key of `owner_id` in the Cats table. How would we craft a query that would grab us all of the cats with a particular owner, and even include information about that owner in the data returned to us by that query? We know how to write a `SELECT` statement that gets us all of the cats with a particular `owner_id`. For example:","path":"README.md","position":14,"original_position":14,"commit_id":"9d88c5ef6184fa9ef9263a4f4f21784e1f3c760f","original_commit_id":"9d88c5ef6184fa9ef9263a4f4f21784e1f3c760f","user":{"login":"SophieDeBenedetto","id":8999596,"avatar_url":"https://avatars.githubusercontent.com/u/8999596?v=3","gravatar_id":"","url":"https://api.github.com/users/SophieDeBenedetto","html_url":"https://github.com/SophieDeBenedetto","followers_url":"https://api.github.com/users/SophieDeBenedetto/followers","following_url":"https://api.github.com/users/SophieDeBenedetto/following{/other_user}","gists_url":"https://api.github.com/users/SophieDeBenedetto/gists{/gist_id}","starred_url":"https://api.github.com/users/SophieDeBenedetto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SophieDeBenedetto/subscriptions","organizations_url":"https://api.github.com/users/SophieDeBenedetto/orgs","repos_url":"https://api.github.com/users/SophieDeBenedetto/repos","events_url":"https://api.github.com/users/SophieDeBenedetto/events{/privacy}","received_events_url":"https://api.github.com/users/SophieDeBenedetto/received_events","type":"User","site_admin":false},"body":"This reading comes after the reading and code along on table relations w discussion of foreign keys https://github.com/learn-co-curriculum/table-relations","created_at":"2015-10-22T13:27:49Z","updated_at":"2015-10-22T13:27:49Z","html_url":"https://github.com/learn-co-curriculum/sql-joins/pull/1#discussion_r42747035","pull_request_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls/comments/42747035"},"html":{"href":"https://github.com/learn-co-curriculum/sql-joins/pull/1#discussion_r42747035"},"pull_request":{"href":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls/1","id":48121948,"html_url":"https://github.com/learn-co-curriculum/sql-joins/pull/1","diff_url":"https://github.com/learn-co-curriculum/sql-joins/pull/1.diff","patch_url":"https://github.com/learn-co-curriculum/sql-joins/pull/1.patch","issue_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/issues/1","number":1,"state":"closed","locked":false,"title":"all necessary files and objectives","user":{"login":"SophieDeBenedetto","id":8999596,"avatar_url":"https://avatars.githubusercontent.com/u/8999596?v=3","gravatar_id":"","url":"https://api.github.com/users/SophieDeBenedetto","html_url":"https://github.com/SophieDeBenedetto","followers_url":"https://api.github.com/users/SophieDeBenedetto/followers","following_url":"https://api.github.com/users/SophieDeBenedetto/following{/other_user}","gists_url":"https://api.github.com/users/SophieDeBenedetto/gists{/gist_id}","starred_url":"https://api.github.com/users/SophieDeBenedetto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SophieDeBenedetto/subscriptions","organizations_url":"https://api.github.com/users/SophieDeBenedetto/orgs","repos_url":"https://api.github.com/users/SophieDeBenedetto/repos","events_url":"https://api.github.com/users/SophieDeBenedetto/events{/privacy}","received_events_url":"https://api.github.com/users/SophieDeBenedetto/received_events","type":"User","site_admin":false},"body":"@jmburges @AnnJohn ","created_at":"2015-10-19T20:29:29Z","updated_at":"2015-10-22T13:27:49Z","closed_at":"2015-10-22T02:35:04Z","merged_at":"2015-10-22T02:35:04Z","merge_commit_sha":"e1eec5570d7cb151d918a1b206c2424952c72a25","assignee":{"login":"jmburges","id":58342,"avatar_url":"https://avatars.githubusercontent.com/u/58342?v=3","gravatar_id":"","url":"https://api.github.com/users/jmburges","html_url":"https://github.com/jmburges","followers_url":"https://api.github.com/users/jmburges/followers","following_url":"https://api.github.com/users/jmburges/following{/other_user}","gists_url":"https://api.github.com/users/jmburges/gists{/gist_id}","starred_url":"https://api.github.com/users/jmburges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmburges/subscriptions","organizations_url":"https://api.github.com/users/jmburges/orgs","repos_url":"https://api.github.com/users/jmburges/repos","events_url":"https://api.github.com/users/jmburges/events{/privacy}","received_events_url":"https://api.github.com/users/jmburges/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls/1/commits","review_comments_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls/1/comments","review_comment_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/issues/1/comments","statuses_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/statuses/9d88c5ef6184fa9ef9263a4f4f21784e1f3c760f","head":{"label":"learn-co-curriculum:wip-new-readme","ref":"wip-new-readme","sha":"9d88c5ef6184fa9ef9263a4f4f21784e1f3c760f","user":{"login":"learn-co-curriculum","id":6208017,"avatar_url":"https://avatars.githubusercontent.com/u/6208017?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-curriculum","html_url":"https://github.com/learn-co-curriculum","followers_url":"https://api.github.com/users/learn-co-curriculum/followers","following_url":"https://api.github.com/users/learn-co-curriculum/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-curriculum/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-curriculum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-curriculum/subscriptions","organizations_url":"https://api.github.com/users/learn-co-curriculum/orgs","repos_url":"https://api.github.com/users/learn-co-curriculum/repos","events_url":"https://api.github.com/users/learn-co-curriculum/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-curriculum/received_events","type":"Organization","site_admin":false},"repo":{"id":44561592,"name":"sql-joins","full_name":"learn-co-curriculum/sql-joins","owner":{"login":"learn-co-curriculum","id":6208017,"avatar_url":"https://avatars.githubusercontent.com/u/6208017?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-curriculum","html_url":"https://github.com/learn-co-curriculum","followers_url":"https://api.github.com/users/learn-co-curriculum/followers","following_url":"https://api.github.com/users/learn-co-curriculum/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-curriculum/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-curriculum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-curriculum/subscriptions","organizations_url":"https://api.github.com/users/learn-co-curriculum/orgs","repos_url":"https://api.github.com/users/learn-co-curriculum/repos","events_url":"https://api.github.com/users/learn-co-curriculum/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-curriculum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learn-co-curriculum/sql-joins","description":"","fork":false,"url":"https://api.github.com/repos/learn-co-curriculum/sql-joins","forks_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/forks","keys_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/teams","hooks_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/hooks","issue_events_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/issues/events{/number}","events_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/events","assignees_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/assignees{/user}","branches_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/branches{/branch}","tags_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/tags","blobs_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/git/refs{/sha}","trees_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/statuses/{sha}","languages_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/languages","stargazers_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/stargazers","contributors_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/contributors","subscribers_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/subscribers","subscription_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/subscription","commits_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/commits{/sha}","git_commits_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/git/commits{/sha}","comments_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/comments{/number}","issue_comment_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/issues/comments{/number}","contents_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/contents/{+path}","compare_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/merges","archive_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/downloads","issues_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/issues{/number}","pulls_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls{/number}","milestones_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/milestones{/number}","notifications_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/labels{/name}","releases_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/releases{/id}","created_at":"2015-10-19T20:20:29Z","updated_at":"2015-10-19T20:20:29Z","pushed_at":"2015-10-22T02:35:06Z","git_url":"git://github.com/learn-co-curriculum/sql-joins.git","ssh_url":"git@github.com:learn-co-curriculum/sql-joins.git","clone_url":"https://github.com/learn-co-curriculum/sql-joins.git","svn_url":"https://github.com/learn-co-curriculum/sql-joins","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"learn-co-curriculum:master","ref":"master","sha":"ad3e51d4fdd7b585ea0ab09e294787695129105b","user":{"login":"learn-co-curriculum","id":6208017,"avatar_url":"https://avatars.githubusercontent.com/u/6208017?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-curriculum","html_url":"https://github.com/learn-co-curriculum","followers_url":"https://api.github.com/users/learn-co-curriculum/followers","following_url":"https://api.github.com/users/learn-co-curriculum/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-curriculum/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-curriculum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-curriculum/subscriptions","organizations_url":"https://api.github.com/users/learn-co-curriculum/orgs","repos_url":"https://api.github.com/users/learn-co-curriculum/repos","events_url":"https://api.github.com/users/learn-co-curriculum/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-curriculum/received_events","type":"Organization","site_admin":false},"repo":{"id":44561592,"name":"sql-joins","full_name":"learn-co-curriculum/sql-joins","owner":{"login":"learn-co-curriculum","id":6208017,"avatar_url":"https://avatars.githubusercontent.com/u/6208017?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-curriculum","html_url":"https://github.com/learn-co-curriculum","followers_url":"https://api.github.com/users/learn-co-curriculum/followers","following_url":"https://api.github.com/users/learn-co-curriculum/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-curriculum/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-curriculum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-curriculum/subscriptions","organizations_url":"https://api.github.com/users/learn-co-curriculum/orgs","repos_url":"https://api.github.com/users/learn-co-curriculum/repos","events_url":"https://api.github.com/users/learn-co-curriculum/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-curriculum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learn-co-curriculum/sql-joins","description":"","fork":false,"url":"https://api.github.com/repos/learn-co-curriculum/sql-joins","forks_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/forks","keys_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/teams","hooks_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/hooks","issue_events_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/issues/events{/number}","events_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/events","assignees_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/assignees{/user}","branches_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/branches{/branch}","tags_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/tags","blobs_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/git/refs{/sha}","trees_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/statuses/{sha}","languages_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/languages","stargazers_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/stargazers","contributors_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/contributors","subscribers_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/subscribers","subscription_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/subscription","commits_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/commits{/sha}","git_commits_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/git/commits{/sha}","comments_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/comments{/number}","issue_comment_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/issues/comments{/number}","contents_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/contents/{+path}","compare_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/merges","archive_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/downloads","issues_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/issues{/number}","pulls_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls{/number}","milestones_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/milestones{/number}","notifications_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/labels{/name}","releases_url":"https://api.github.com/repos/learn-co-curriculum/sql-joins/releases{/id}","created_at":"2015-10-19T20:20:29Z","updated_at":"2015-10-19T20:20:29Z","pushed_at":"2015-10-22T02:35:06Z","git_url":"git://github.com/learn-co-curriculum/sql-joins.git","ssh_url":"git@github.com:learn-co-curriculum/sql-joins.git","clone_url":"https://github.com/learn-co-curriculum/sql-joins.git","svn_url":"https://github.com/learn-co-curriculum/sql-joins","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls/1"},"html":{"href":"https://github.com/learn-co-curriculum/sql-joins/pull/1"},"issue":{"href":"https://api.github.com/repos/learn-co-curriculum/sql-joins/issues/1"},"comments":{"href":"https://api.github.com/repos/learn-co-curriculum/sql-joins/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learn-co-curriculum/sql-joins/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/learn-co-curriculum/sql-joins/statuses/9d88c5ef6184fa9ef9263a4f4f21784e1f3c760f"}}}}