Why use multiple tables

Basic join

SELECT collection_event.site, fdate, treatment, soil
FROM collection_event
JOIN sites ON (collection_event.siteID = sites.siteID)
LIMIT 20
SELECT collection_event.site, fdate, treatment, soil
FROM collection_event
JOIN sites USING (siteID)
LIMIT 20

Compound Joins

SELECT * from specimens a
JOIN bee_traits b ON concat(a.genus, a.species) = concat(b.genus, b.species);
SELECT a.*, b.sociality, b.lecticity 
FROM specimens a
LEFT JOIN bee_traits b on concat(a.genus, a.species) = concat(b.genus, b.species)

Multi-table join

SELECT genus, species, plant, specimens.site, collection_event.fdate, temp, wind, treatment, soil
FROM specimens
JOIN collection_event USING (colleventID)
LEFT JOIN sites ON (sites.siteID = collection_event.siteID 
AND sites.site = collection_event.site)
LIMIT 50;

Saving queries for future use

CREATE OR REPLACE VIEW species_specimen_traits AS
SELECT a.*, b.sociality, b.lecticity 
FROM specimens a
LEFT JOIN bee_traits b on concat(a.genus, a.species) = concat(b.genus, b.species);