← LinkedIn Interview Insights

LinkedIn·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

SQL-heavy technical screen for a Data Scientist role at LinkedIn. Three questions, all around the same two tables, each one a bit more annoying than the last. Nothing too exotic but the third one tripped me up more than I expected.

Questions Asked (3)

Q1

Using a members table and a video_posts table, count how many members uploaded their very first video on the same calendar date they joined the platform.

Product Analytics & MetricsData Modeling
Author's notes

Straightforward once you see it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, identify each member's first video upload date by finding the minimum post_date per member from the video_posts table. Then, join this result to the members table on member_id and count members where the first upload date equals the join date. Use a subquery or window function to get the first upload date efficiently.

Pro tip: Clarify whether 'same calendar date' means exact date match or within the same day (ignoring time), and confirm if members with no uploads should be excluded—this shows attention to edge cases and business context.

1. Understand the tables and keys

Examine the schema of members and video_posts to identify the join key (e.g., member_id) and relevant date columns (join_date in members, post_date in video_posts).

2. Find each member's first video upload date

Use a GROUP BY member_id with MIN(post_date) or a window function like ROW_NUMBER() to get the earliest video upload date per member.

3. Join first upload date to members table

Join the aggregated first upload data back to the members table on member_id, ensuring you keep all members or only those with uploads as needed.

4. Compare dates and count

Filter rows where the first upload date equals the join date (considering only the date part) and count the number of distinct members.

5. Validate and handle edge cases

Check for NULLs, timezone differences, and members with no uploads; consider if multiple uploads on the join date affect the count.

Key Points to Mention

  • Use of MIN() or ROW_NUMBER() to identify the first video upload per member.
  • Joining on member_id and ensuring correct date comparison (e.g., DATE(join_date) = DATE(first_upload_date)).
  • Handling members with no video uploads (e.g., LEFT JOIN vs INNER JOIN).
  • Considering timezone or timestamp truncation if dates include time components.
  • Using COUNT(DISTINCT member_id) to avoid duplicates if multiple videos were uploaded on the same day.
  • Performance considerations: indexing on member_id and date columns for large datasets.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Compare total video uploads between US members and non-US members, where US is defined as country = 'usa'.

Product Analytics & Metrics
Author's notes

Easy.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the metric definition: total video uploads likely means the count of videos uploaded by members, not the number of members who uploaded. Then write a SQL query that groups by a CASE WHEN country = 'usa' THEN 'US' ELSE 'Non-US' END and counts video uploads, ensuring you join the appropriate tables (e.g., members and videos) and handle potential data quality issues like null countries or duplicate uploads.

Pro tip: Mention that you would validate the definition of 'video upload' with stakeholders (e.g., does it include live videos, stories, or only permanent uploads?) and check for edge cases like members with multiple countries or missing country data, as these can significantly skew the comparison.

1. Clarify the metric and scope

Confirm what 'total video uploads' means (e.g., count of videos, not uploaders) and the time frame. Ensure 'US' is strictly country = 'usa' and consider how to handle null or invalid country values.

2. Identify relevant tables and joins

Determine which tables contain member country and video upload events. Typically, a members table with country and a videos table with member_id and upload timestamp. Join on member_id.

3. Write the SQL query

Use a CASE statement to segment US vs. non-US, then COUNT the video uploads. Example: SELECT CASE WHEN m.country = 'usa' THEN 'US' ELSE 'Non-US' END AS region, COUNT(v.video_id) AS total_uploads FROM members m JOIN videos v ON m.member_id = v.member_id GROUP BY 1;

4. Validate and interpret results

Check for data quality issues (e.g., null countries, duplicate video records) and consider if the comparison should be normalized (e.g., per capita). Discuss any caveats and potential follow-up analyses.

Key Points to Mention

  • Definition of 'video upload' (e.g., count of videos vs. unique uploaders, inclusion of live/story content)
  • Handling of null or missing country values (e.g., exclude or categorize as 'Unknown')
  • SQL implementation using CASE WHEN and GROUP BY
  • Potential data quality issues like duplicate video records or bot activity
  • Normalization considerations (e.g., uploads per member) for fair comparison
  • Time frame and seasonality effects on upload behavior

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

For each country, find the number of distinct members who have posted at least one video longer than 60 seconds.

Product Analytics & MetricsData Modeling
Author's notes

This is where I fumbled a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the schema and definitions (e.g., what constitutes a 'member', 'country', and 'video length'). Then outline a SQL or pandas solution that joins members, videos, and countries, filters videos longer than 60 seconds, and counts distinct members per country. Finally, discuss edge cases like null countries, duplicate videos, and performance considerations.

Pro tip: Mention that you would validate the result by checking for members with multiple qualifying videos and ensuring the count is distinct, not total videos. Also, proactively discuss how to handle members with missing country data, as this is a common data quality issue.

1. Clarify definitions and assumptions

Confirm what 'member', 'country', and 'video longer than 60 seconds' mean in the data model. Ask about the grain of the tables and whether country is associated with the member or the video.

2. Identify relevant tables and joins

Determine which tables contain member IDs, country information, and video metadata. Plan the necessary joins, ensuring you use the correct keys and handle potential many-to-many relationships.

3. Filter and aggregate

Filter videos where duration > 60 seconds, then group by country and count distinct member IDs. Use COUNT(DISTINCT member_id) to avoid double-counting members with multiple qualifying videos.

4. Handle edge cases and validate

Address null countries, duplicate records, and members with no country. Validate results by spot-checking a few countries or comparing with a manual calculation on a sample.

5. Optimize and present

Discuss performance optimizations (e.g., indexing, partitioning) and present the final query or pseudocode clearly, explaining each step.

Key Points to Mention

  • Use of COUNT(DISTINCT member_id) to ensure distinct members are counted.
  • Definition of 'video longer than 60 seconds' (e.g., duration > 60, not >=).
  • Handling of members with missing or null country information.
  • Potential need to join member and video tables on member_id and country table on country_id.
  • Consideration of video duplicates or multiple posts by the same member.
  • Performance implications of large datasets and possible optimizations.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.