Python Strata Scratch Question
Q1
Find the most profitable company in the financial sector of the entire world along with its continent(Forbes)
→ Find the most profitable company from the financial sector. Output the result along with the continent.
Q2
Salaries Differences(Linkedin)
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.
Q3
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.
Q4
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.
Q5
Bikes Last Used (Lyft , DoorDash)
Find the last time each bike was in use. Output both the bike number and the date-timestamp of the bike’s last use (i.e., the date-time the bike was returned). Order the results by bikes that were most recently used.
Q6
Number of Speakers By Language (Google,Apple)
Find the number of speakers of each language by country. Output the country, language, and the corresponding number of speakers. Output the result based on the country in ascending order.
Q7
Get Tanmoy Banerjee’s stories in your inbox
Join Medium for free to get updates from this writer.
Find the top 3 jobs with the highest overtime pay rate
Get the job titles of the 3 employees who received the most overtime pay Output the job title of selected records.
Q8
Find the total number of searches for houses Westlake neighborhood with a TV (Airbnb)
Find the total number of searches for houses in Westlake neighborhood with a TV among the amenities.
Q9
Count the number of user events performed by MacBook Pro users (Apple)
Count the number of user events performed by MacBookPro users. Output the result along with the event name. Sort the result based on the event count in the descending order.
Q10
Churro Activity Date
Find the activity date and the pe_description of facilities with the name ‘STREET CHURROS’ and with a score of less than 95 points.
Q11
Churn Rate Of Lyft Drivers (Lyft)
Find the global churn rate of Lyft drivers across all years. Output the rate as a ratio.
Q12
Find the most dangerous places in SF
Find the most dangerous places in SF based on the crime count per address and district combination. Output the number of incidents alongside the corresponding address and the district. Order records based on the number of occurrences in descending order.
Q13
Top Ranked Songs (Spotify)
Find songs that have ranked in the top position. Output the track name and the number of times it ranked at the top. Sort your records by the number of times the song was in the top position in descending order.










