Technology Solutions for Everyday Folks

Tagged with 'sql'

What's That Join Again?

Visualization of SQL Joins

In the interest of hopefully saving Future Me some time, I'm writing this little bit so as not to have to stumble to remember a simple premise:

How do I LEFT JOIN the same table more than once in a query?

For as many times as I've had to join a table more than once (effectively as a certain type of generic lookup table), you'd think I'd have this memorized. But I always get caught forgetting to proper alias both joins.

Read More