How to Excel in SQL Interview
How to Excel in SQL Interview
Demonstrating a solid foundation in SQL is paramount to getting a BIE offer from Amazon. You will be
provided with sample tables through a web URL (list of columns/tables and sometimes with fake data,
there is no actual database behind it for you to test your codes). Thus, Interviews are more curious
about the way you approach the problem and the key SQL functions you choose to use. Always seek
clarification about the question upon hearing it, even if you think it is clear. Be prepared to write SQL
fluently and think about edge cases. Understand different types of joins and how condition filters affect
the joins. Be familiar with ways of simplifying a complex query and optimizing performance. Below are
some additional tips that I recommend:
Write a list of requirements on the board, and keep asking questions, as the initial problem
statement may be vague. Requirements should be the first thing you write out.
Interact with your interviewer. Engage with your interviewer with necessary questions to
complete the exercise.
Dig for clarification. Your interviewer will not try to trick you. Questions may be intentionally
vague to push your innovation.
Know how your solution solves the problem. If you suggest technology to help solve, understand
how that technology works.
Think out loud as you work through the problem. This allows the interviewer to better follow
and understand your thought process.
Review your code and clean up any mistakes. Point out ways in which you can optimize the
query for performance.
A few sample questions might sound like:
o Give me a query that shows how many units I received per week, for the past year.
o Give me a query that shows how long it takes these units to arrive.
o Give me a list of item ids that we received in the past two months from more than
one vendor, where the cost was different.