Solving a Facebook Data Science Interview Questions | (SQL Interview Questions and Answer) @stratascratch
Solving a Facebook Data Science Interview Questions | (SQL Interview Questions and Answer)  @stratascratch
Uploaded October 2020 | Updated September 2026, 4 hours ago
This SQL data science interview question was asked by Facebook. I’ll cover both the question and answer and give a detailed explanation of the approach. I walkthrough each step of my answer, assumptions, approach, and explain every line of code I write. This is literally how I would answer every data science interview question and prepare for every data science interview at FAANG companies and others.

Link to the question: platform.stratascratch.com/coding/10288-clicked-vs-non-clicked-search-results?python=&utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link (the question on the platform has to be rewritten)

This question can seem hard when you first read it. But this question can be broken down into multiple parts. We cover how to build a CTE or SQL subquery to classify results in the top 3 positions and the LEFT JOIN the table to the original table so that you can preserve the number of rows, which you’ll need to count when calculating a percentage. Most importantly, we’ll cover what the resulting SQL LEFT JOIN will look like so that you can understand how to write the percentage formula in the SELECT clause. This question covers concepts that are commonly found in data science interviews at Facebook and Google.

______________________________________________________________________

This series is for both beginner and intermediate data scientists and analysts interested in learning how to solve common data science interview questions in SQL. These are real data science interview questions. For some background context and an intro about what this series is about: bit.ly/36kKbxG

πŸ‘‰ Subscribe to my channel: bit.ly/2GsFxmA
πŸ‘‰ Playlist for more data science interview questions and answers: bit.ly/3jifw81
πŸ‘‰ Playlist for data science interview tips: bit.ly/2G5hNoJ
πŸ‘‰ Practice more real data science interview questions: platform.stratascratch.com/coding?utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link

______________________________________________________________________
Timestamps:

Intro: (0:00)
Interview Question: (0:13)
Exploring The Data: (0:34)
Solution Framework Before Coding: (1:03)
Coding: SUBQUERY: (3:29)
Coding: LEFT JOIN: (4:03)
Coding: Calculating Percentage: (4:59)
______________________________________________________________________
About The Platform:

I'm using StrataScratch, a platform that allows you to practice real data science interview questions. There are over 1000+ interview questions that cover coding (SQL and python), statistics, probability, product sense, and business cases.

I created this platform because I wanted to build a resource to specifically help prepare data scientists for their technical interviews and to generally improve their analytical skills. Over my career as a data scientist, I never was able to find a dedicated platform for data science interview prep. LeetCode and HackerRank were the closest but these platforms specifically serve the computer developer community so their questions focus more on algorithms that working with data.

So, if you want more interview practice with real data science interview questions, visit platform.stratascratch.com/coding?utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link. All questions are free and you can even execute SQL and python code in the IDE, but if you want to check out the solutions from me or from other users, you can use ss15 for a 15% discount on the premium plans.

______________________________________________________________________
Contact:

If you have any questions, comments, or feedback, please leave them here!
Feel free to also email me at nathan@stratascratch.com
______________________________________________________________________
Solving a Facebook Data Science Interview Questions | (SQL Interview Questions and Answer)The Biggest Lie in Data Science: You Need to Build an AppCoding Concepts in Data Science Interviews in 2021 (Facebook, Twitch, Postmates)Classical Machine Learning [DoorDash Data Science Project]Exploring and Cleaning Data: The First Step in Every Data Projectthis spreadsheet tried to end me (but i had a plan)5 Skills Companies Look For in Data Science Candidates + 5 Project IdeasData Science Job Types & CareersFiltered Based Feature Selection for Machine Learning In 5 Mins[Part 1] How to Solve an Amazon Python Interview Question - The 3-Step FrameworkUsing IFNULL() on a Google SQL Interview QuestionTop Data Analyst Tools: From Beginner to Pro [Ultimate Guide]
StrataScratch |

Solving a Facebook Data Science Interview Questions | (SQL Interview Questions and Answer)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER