- Review SQL commands for CRUD
- Introduce:
count
order by
limit
--
15 min
https://gist.github.com/mdang/7e68c9473de0c0363d9b778d7ca02c2b
--
- Add
cohort
table tousers
inwdi
database - Add new column to
users
table - Set up foreign keys
- Explain relationships between tables
An SQL JOIN clause is used to combine rows from two or more tables, based on a common field between them. There are different types of joins available in SQL:
- INNER JOIN: returns rows when there is a match in both tables
- LEFT JOIN: returns all rows from the left table, even if there are no matches in the right table
https://blog.codinghorror.com/a-visual-explanation-of-sql-joins/
-
Load sample
world
database -
Alter database table names
-
Show joins in action with sample database
20 min
https://gist.github.com/mdang/9a4a8063ebea3b829b8025746643ade1