r/dataanalysiscareers 19h ago

Learning / Training Made a SQL interview cheat sheet for data analyst interviews. What would you add?

Post image

Put together this one-page SQL revision sheet for analyst interviews.

I tried to cover the things that tend to matter beyond just remembering syntax: joins, aggregation grain, NULL handling, CTEs, window functions, common interview patterns, and mistakes that can quietly give you the wrong result.

For people who've actually done data analyst interviews, what SQL topic or question pattern would you add?

149 Upvotes

9 comments sorted by

8

u/Appropriate_Sugar202 18h ago

Whatever you end up with, make a version that doesn't mention interviews. I'd print and hang this, but the interview mention is off-putting for something that could be used daily.  Great job btw!

5

u/_onelast 18h ago

So just SQL cheat sheet. Nice. It’s next on my list to learn so I’ll snag this for the the future

2

u/winstr12 9h ago

Isn't it 1. query order

FROM

WHERE

GROUP BY

HAVING

SELECT

ORDER BY

2

u/S-Kenset 9h ago

no the graphic is right.

1

u/Ksnku 7h ago

You're listing the order of operations / execution, not order of syntax. Order of operations is a more advanced use case

1

u/Parking_Increase4664 4h ago

Yep, if we're talking about the order of execution, then the correct order will be:

FROM

WHERE

GROUP BY

HAVING

SELECT

ORDER BY

2

u/Parking_Increase4664 4h ago

INDEX? UNION ALL, UNION, INTERSECT? CONCATENATE?

1

u/nian2326076 1h ago

You might want to add sections on indexing and query optimization. Interviewers often check if you can make queries more efficient, especially with big datasets. Also, consider covering subqueries and how they perform compared to joins. Error handling and transaction management are good to include to show you're thinking about robustness.

I've found PracHub helpful for practicing interview questions and understanding common patterns. They have good material on SQL topics and how they might appear in interviews. Just a suggestion if you want another angle on your prep!