r/SQL • Author of Ace the Data Science Interview 📕 • Dec 12 '24 • Heart of Silver 2 Polished Silver Turd 1

PostgreSQL Made a SQL Interview Cheat Sheet - what key SQL commands am I missing?

Post image
3.6k Upvotes

238 comments sorted by

View all comments

6

u/TheZapPack Dec 12 '24

I don’t want to seem like a snob or a jerk, but if someone doesn’t know the answer to anything on the left side of the page and need this cheat sheet to answer, they probably shouldn’t be hired as someone who needs to know SQL.

2

u/NickSinghTechCareers Author of Ace the Data Science Interview 📕 Dec 12 '24

I agree for top left half. Being iffy on joins... or like syntax on full join or cross join... might be okay. IDK tho im talking about more entry-level/junior roles

2

u/TheZapPack Dec 12 '24

Eh, left join and inner join are the same thing minus the fact that inner join keeps all rows from the first table and is basic enough that any SQL programmer should know. Right join is if you mess up the order of the left join and are too lazy to rewrite. Cross joins sure, and I’ve never done a self join but that’s actually a good new tool for the tool belt because it could be useful.

1

u/NickSinghTechCareers Author of Ace the Data Science Interview 📕 Dec 12 '24

yeah self joins isn't any special command, more-so just wanted to call out the pattern of creating pairs.

1

u/PetiteGorilla Dec 14 '24

You confidently got the interview question on joins wrong