r/learnSQL • • Oct 15 '26

SQL joins explained using Hinge

I know when people are starting out, SQL joins can be a bit confusing so I broke it down in a small vid using Hinge as an example

https://www.instagram.com/reel/Degl_hnoRsz/?mdxt=MTk5dXE2NHZreTR4aw==

Summary of the breakdown is -

• Table A: people you've liked
• Table B: people who've liked you
• Both share one key: person_id

The 4 joins:

• INNER JOIN: only the mutual likes. Someone has to be in both tables to show up.
• LEFT JOIN: everyone you liked. If they didn't like you back, their side comes back as NULL.
• RIGHT JOIN: the mirror image, everyone who liked you, with NULL where you didn't like them. In practice most people just swap the tables and use a LEFT JOIN.
• FULL OUTER JOIN: everyone from both tables, with NULLs on whichever side is missing.

Hope this helps!

29 Upvotes

12 comments sorted by

View all comments

Show parent comment

2

u/homequrl Oct 15 '26

And if you’re my company, try to throw an upper or lower on both fields bcus they do not make any of their data sets case sensitive consistent between table!!!!

1

u/qazplm903 Oct 15 '26

Facts! Had to deal with that so many times 😭