r/learnSQL • u/Sea_Butterfly713 • Jun 22 '26
how you guys prepare for interview ? like whats your technique/routine ? any tips and tricks ?
do you guys write all the interview question on book and memorize it everyday or you have any other technique
35
Upvotes
12
u/DataCamp Jun 22 '26
Memorizing questions doesn't really work for SQL because interviews test your ability to write and reason through queries on the spot. A better approach is practicing until the logic is automatic.
The questions that come up most consistently fall into a few categories. Concepts you need to be able to explain clearly: the difference between INNER, LEFT, RIGHT, and FULL joins and when to use each, what a CTE is vs a subquery and why you'd choose one over the other, how window functions like ROW_NUMBER, RANK, and LAG work, and what indexing does for query performance.
Coding problems that come up repeatedly: finding the second highest (or nth highest) value in a table, removing duplicates, calculating running totals, writing a query to find users active in one period but not another, and aggregating data across multiple groups.
The most useful practice routine is writing queries against real data every day, not drilling flashcards. Pick a dataset you find interesting and set yourself questions to answer with SQL. Then practice explaining what your query is doing out loud, because a lot of interviews want to hear your reasoning, not just see the output.
15
u/decrementsf Jun 22 '26
Bomb one. Reflect on the experience. Repeat. Provides a wonderful teacher. It's going to happen anyway. Keep driving forward. "Speed run the minefield"
3
u/JumpAfter143 Jun 23 '26
You can ask Claude or others AI now to prep you and ask you a tons of question and juste make it on repeat. Few hours and you'll be ready to answer almost every questions
3
u/NaNaNaPandaMan Jun 26 '26
Look up the STAR method. Interviewers don't want regurgitate answers but they want to see actual experience. STAR shows that.
S situation -What us going IE This one time I had this problem.
T ask. -What you need to do. IE So I needed to get this done.
A ction- What you did. IE To get this done I did this.
R result- What ended up happening. IE by doing what I did this happened.
3
u/[deleted] Jun 22 '26
[removed] — view removed comment
2
u/[deleted] Jun 22 '26
[removed] — view removed comment