SQL Strata Scratch Questions
Q1
Order Details ( Amazon / Shopify )
Find order details made by Jill and Eva. Consider the Jill and Eva as first names of customers. Output the order date, details and cost along with the first name. Order records based on the customer id in ascending order.
Q2
Workers With The Highest Salaries (Amazon / DoorDash )
You have been asked to find the job titles of the highest-paid employees.
Get Tanmoy Banerjee’s stories in your inbox
Join Medium for free to get updates from this writer.
Your output should include the highest-paid title or multiple titles with the same salary.
Q3
Find the top 10 ranked songs in 2010 (Spotify)
What were the top 10 ranked songs in 2010? Output the rank, group name, and song name but do not show the same song twice. Sort the result based on the year_rank in ascending order.
Q4
Salaries Differences ( LinkedIn / Dropbox )
Write a query that calculates the difference between the highest salaries found in the marketing and engineering departments. Output just the absolute difference in salaries.
Q5
Customer Details ( Apple / Amazon )
Find the details of each customer regardless of whether the customer made an order. Output the customer’s first name, last name, and the city along with the order details. You may have duplicate rows in your results due to a customer ordering several of the same items. Sort records based on the customer’s first name and the order details in ascending order.
Q6
Number Of Bathrooms And Bedrooms ( Airbnb )
Find the average number of bathrooms and bedrooms for each city’s property types. Output the result along with the city name and the property type.
Q7
Employees’ Without Annual Review (Uber)
Return all employees who have never had an annual review. Your output should include the employee’s first name, last name, hiring date, and termination date. List the most recently hired employees first.
Q8
Find all posts which were reacted to with a heart (Meta/ Facebook)
Find all posts which were reacted to with a heart. For such posts output all columns from facebook_posts table.
Q9
Number Of Units Per Nationality (Airbnb)
Find the number of apartments per nationality that are owned by people under 30 years old. Output the nationality along with the number of apartments. Sort records by the apartments count in descending order.
Q10
Number of Hires During Specific Time Period (Deloitte)
You have been asked to find the number of employees hired between the months of January and July in the year 2022 inclusive. Your output should contain the number of employees hired in this given time frame.
Q11
Find the number of entries per star (Yelp)
Find the number of entries per star. Output each number of stars along with the corresponding number of entries. Order records by stars in ascending order.
Q12
Lyft Driver Wages (Lyft)
Find all Lyft drivers who earn either equal to or less than 30k USD or equal to or more than 70k USD. Output all details related to retrieved records.
Q13
Inactive Free Users(Ring Central)
Return a list of users with status free who didn’t make any calls in Apr 2020.
Q14
Total Shipment Weight (Amazon)
Calculate the total weight for each shipment and add it as a new column. Your output needs to have all the existing rows and columns in addition to the new column that shows the total weight for each shipment. One shipment can have multiple rows.
Q15
Change of Currency Exchange Rates (Goldman Sachs)
You are given a list of exchange rates from various currencies to US Dollars (USD) in different months. Show how the exchange rate of all the currencies changed in the first half of 2020. Output the currency code and the difference between values of the exchange rate between July 1, 2020 and January 1, 2020.
Q16
Highest Salary & Full Name (Amazon / Visa )
Your output should include the full name of the employee(s) with the highest salary in one column and the corresponding salary in the other.
Q17
Gender With Generous Reviews (Airbnb)
Write a query to find which gender gives a higher average review score when writing reviews as guests. Use the from_type column to identify guest reviews. Output the gender and their average review score.









