Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
7 views

How to Excel in SQL Interview

Uploaded by

Saisandeep Manne
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

How to Excel in SQL Interview

Uploaded by

Saisandeep Manne
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

How to excel in SQL interview

SQL Technical Questions

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.

Links to practice SQL and Python:


 SQL Practice test: https://www.hackerrank.com/domains/sql?filters%5Bdifficulty%5D%5B
%5D=hard
Please select HARD (under difficulty) and all options (under Subdomains) except the BASIC ones
(if you have time to attempt for BASIC please go ahead)
 (Optional) Python Practice test: https://www.hackerrank.com/domains/python?filters
%5Bdifficulty%5D%5B%5D=medium
Please select MEDIUM (under difficulty) and any options of your choice (under Subdomains)

Please review the SQL interview cheat sheet below:


A B
1
Level Concept
2
Basics joins (left, outer,
etc)
3
Basics filters (where,
having)
4
Basics grouping and
aggregation
5
Basics ordering
6
intermediate sub queries
7
intermediate common table
expressions
8
intermediate temporary tables
9
intermediate text manipulations
10
intermediate date
manipulations
11
intermediate window functions
(lead or lag
functions,
Partition by
clauses)
12
intermediate Missing value
handling

You might also like