Google SQL Interview Questions
Google SQL Interview Questions
SQL
Interview questions
for Data Analysts
linkedin.com/in/enayat-ur-rahman
1. Median Number of Searches
linkedin.com/in/enayat-ur-rahman
search_frequency
linkedin.com/in/enayat-ur-rahman
How to Solve:
1.Expand Data:
Create a detailed list where each
search count is repeated according to
the number of users. For example, if
10 users made 5 searches each, the
list should include 10 entries of 5
searches.
1.Calculate Median:
Use the expanded list to find the
median value. The median is the
middle value when all entries are
ordered. If the number of entries is
even, the median is the average of the
two middle values.
linkedin.com/in/enayat-ur-rahman
linkedin.com/in/enayat-ur-rahman
2. Sum of Odd and Even Measurements
Problem Statement: You need to calculate the
sum of measurements taken at various cricket
matches, where measurements are
categorized by odd and even row numbers.
You have a table measurements with columns
measurement_time and measurement_value.
linkedin.com/in/enayat-ur-rahman
Measurements
linkedin.com/in/enayat-ur-rahman
How to Solve:
2. Calculate Sums:
Use conditional aggregation to sum
measurements based on whether their
row number is odd or even.
linkedin.com/in/enayat-ur-rahman
linkedin.com/in/enayat-ur-rahman
3. Google Maps - Most Off-Topic UGC
Problem Statement: As a Data Analyst on
the Google Maps User Generated Content
team, you and your Product Manager are
investigating user-generated content
(UGC) – photos and reviews that
independent users upload to Google
Maps.
linkedin.com/in/enayat-ur-rahman
linkedin.com/in/enayat-ur-rahman
How to Solve:
linkedin.com/in/enayat-ur-rahman
linkedin.com/in/enayat-ur-rahman
4. Popular Search Categories
linkedin.com/in/enayat-ur-rahman
Categories
Searches
linkedin.com/in/enayat-ur-rahman
How to Solve:
1. Join Tables:
2. Count Searches:
linkedin.com/in/enayat-ur-rahman
linkedin.com/in/enayat-ur-rahman
5. What is Database Denormalization?
Problem Statement: Explain the concept
of denormalization in database design.
linkedin.com/in/enayat-ur-rahman
Denormalization is a database design
approach where tables are combined to
simplify the schema and improve query
performance.
linkedin.com/in/enayat-ur-rahman
Thank you
Found this helpful? Repost!
linkedin.com/in/enayat-ur-rahman