Skip to content

Ryanholly3/joins-practice

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Intro to SQL Joins

Objectives

  • Explain the order & structure of join statements
  • Write basic SQL joins: one-to-many
    • INNER join
    • LEFT join
    • FULL OUTER join
  • Write basic SQL joins that only select certain fields
    • INNER join
    • LEFT join

Instructions

  1. Create a database called joins
  2. Connect to joins database using psql
  3. Run joins.sql file while connected to db:
  • \i joins.sql

INNER JOIN going from 'owner' to 'pet'

SELECT * FROM owner INNER JOIN pet ON pet.owner_id = owner.id;

LEFT JOIN

SELECT * FROM owner LEFT JOIN pet ON pet.owner_id = owner.id;

Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published