My SQL Interview Toolbox

Long gone are the days when only software engineers are subjected to technical interviews. Now, even marketers are put to the test. As a marketer, I’ve been to some ‘technical’ interviews, mostly focused on SQL. Well, some may not consider SQL as ‘technical’, but you should still prepare for this interview like how you would for an algorithm interview!

1. Baby Steps: 6 weeks before your interview

Fast & Furious: w3 SQL Tutorial
A very basic intro to SQL, for those with no absolute idea what “SELECT * FROM table” means.

In-Depth: Head First SQL @ Safari Books Online
For those with more time and perseverance, definitely try Head First to build a solid foundation. Written in a casual and entertaining tone, you will learn the basics of SQL from SELECT, to more complicated JOINS and UPDATES.

Tip — You can access this book with a free 10-day trial at Safari Online. Spend 3 hours a day, and you can definitely finish it within 10 days!

Extras: SQLCourse2
A slightly more advanced introductory tutorial than w3 schools, they have some fun exercises.

2. Teenage Steps: 4 weeks before your interview

Fast & Furious: Stanford Lagunita
A quick overview of most SQL concepts. In typical Stanford style, things are taught fast. So its a good refresher for those who already have some basic SQL knowledge.

In-Depth: LeetCode OJ Datebase *Must-Do*
Leetcode questions are similar to the format of typical questions asked in interviews. More importantly, these questions are structured such that they cover most common SQL question formats.

Tip — OJ stands for Online Judge. Leetcode’s answer checker is case-sensitive- i.e. be sure to capitalize your Table names!

Extras: Practice SQL Interview Questions and Answers
This is a good 101 for those who are just starting to apply their SQL theory knowledge to actual questions.

3. Adult Steps: 2 weeks before your interview

Its 2 weeks before the Day. Practise as much as possible! No more quickies here, short cuts doesn’t work when it is last-minute!

In-Depth: Address common SQL question types.
SQL questions are often in specific formats. You will need to figure out the “formula” for these types of questions.

  1. Nth Highest
  2. Top 3 Order by (E.g. Top 3 most active users)
  3. Top 3 Group By (E.g. Top 3 pay by Department)
  4. Frequency Count (E.g. Average number of logins)
  5. Compare between different time period (E.g. # of posts over 3 months)

Extras: For those who can read Chinese, there’s a treasure trove of Chinese websites/forums with actual interview questions. Chinese forums love to use the Student/ Teacher/ Class table examples.
- 45 SQL Practice Question
- Sina 50 SQL Practice Questions

4. Senior Steps: Lifelong learning

In-Depth: Joe Celko’s SQL Puzzles and Answers
If you can complete half the questions in this book, you don’t have to worry about any SQL interviews. Having done many many SQL questions, these SQL puzzles continue to stump me.

Extras:
SQL is a tool for you to pull information. But what do you do with the millions of rows of data that you’ve pulled out? You process and analyze them! This will require some statistics skills. Khan academy has some comprehensive modules that cater to different math skills levels.

1) Probability and statistics
2) Linear algebra
3) Multivariable calculus

5. Summary: Resources

In-depth: Ordered by difficulty level
1) w3 SQL Tutorial
2) Head First SQL
3) SQL Cookbook
3) Stanford Lagunita
4) LeetCode OJ Datebase
5) Joe Celko’s SQL Puzzles and Answers

Extras:
1) SQLCourse2
2) Practice SQL Interview Questions and Answers
3) Russian SQL exercise website
4) General Statistics — Probability and statistics
5) General Statistics — Linear algebra
6) General Statistics — Multivariable calculus

Originally published at clairelua8.quora.com.

Show your support

Clapping shows how much you appreciated Claire Lua’s story.