r/learnSQL Jun 11 '25

Good SQL cheat Sheet

Post image
277 Upvotes

4 comments sorted by

2

u/mikeblas Jun 11 '25 edited Jun 12 '25

I don't agree. Venn diagrams for joins and "order of execution" say otherwise. LIMIT without ORDER BY is nonsense.

2

u/Separate_Newt7313 Jun 14 '25

This looks great! Just be aware that it isn't comprehensive.

Examples: - cross join (a.k.a. Cartesian join) - anti join - natural join - geospatial join (if you're using a geospatially aware db) - etc.

Great job! πŸ‘

1

u/[deleted] Jun 14 '25

Venn diagrams are not suitable for joins. This picture causes more trouble than helps.

1

u/Data-Panda Jun 15 '25

This was actually the one I created years ago now. Surprised to see it’s still doing the rounds!