layout | element | title | language |
---|---|---|---|
page |
notes |
3-day Introduction to Databases |
SQL |
Basic intro lecture
- Install
- Executing SQL
- Navigation
- Saving queries - Views
- Imports
Quick example of Selecting, Filtering, and Sorting
- Basic joins
- Filter on aggregate vs. raw values
- Show how joins work
- Join main table to species table
- Show species and scientific name side by side
- Show distinct
- Filter by weight > 100 g
SELECT yr, COUNT(period)
FROM (SELECT yr, period FROM PortalMammals_main GROUP BY yr, period)
GROUP BY yr;