PracHub
QuestionsPremiumLearningGuidesInterview PrepCoaches
|Home/Data Manipulation (SQL/Python)/LinkedIn

Determine current notification status

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's ability to derive current entity state from a prior snapshot and a sequence of actions, testing competencies in SQL querying, data aggregation, and state inference within the Data Manipulation (SQL/Python) domain.

  • medium
  • LinkedIn
  • Data Manipulation (SQL/Python)
  • Data Scientist

Determine current notification status

Company: LinkedIn

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Technical Screen

You are given two tables about members' push-notification settings. Table 1: `status_snapshot` - `member_id` INT - `status` STRING — either `'on'` or `'off'` This table stores each member's latest known notification setting as of `2020-01-31 23:59:59 UTC`. Table 2: `actions` - `member_id` INT - `action_date` DATE — UTC calendar date between `2020-02-01` and `2020-02-29` - `action` STRING — either `'turn_on'` or `'turn_off'` Assumptions: - Each row in `actions` is a notification-setting action that occurs after the snapshot in `status_snapshot`. - A member can have at most one action per day. - Members may appear only in `actions` (for example, new members created after the snapshot date). - The member's latest February action determines their final status; if a member has no February actions, keep the snapshot status. Write SQL to return each member's current notification status as of `2020-02-29 23:59:59 UTC`. - Output columns: `member_id, current_status` - Include every member who appears in either table. Follow-up: Suppose `actions` no longer contains `action_date`. Under the assumption that every recorded action is a valid state transition from the member's previous state (so contradictory repeated actions such as `turn_on` when already on do not occur), write SQL or describe how you would infer the final status as of `2020-02-29` using only the snapshot plus the multiset of February actions.

Quick Answer: This question evaluates a candidate's ability to derive current entity state from a prior snapshot and a sequence of actions, testing competencies in SQL querying, data aggregation, and state inference within the Data Manipulation (SQL/Python) domain.

Related Interview Questions

  • Write SQL for rankings, state, and aggregations - LinkedIn (easy)
  • Analyze member video posting behavior by country - LinkedIn (easy)
  • Compute article-type diversity per user and histogram - LinkedIn (easy)
  • Compute each member’s current notification status - LinkedIn (easy)
  • Find top countries by population per continent - LinkedIn (easy)
LinkedIn logo
LinkedIn
Jul 20, 2025, 12:00 AM
Data Scientist
Technical Screen
Data Manipulation (SQL/Python)
5
0

You are given two tables about members' push-notification settings.

Table 1: status_snapshot

  • member_id INT
  • status STRING — either 'on' or 'off'

This table stores each member's latest known notification setting as of 2020-01-31 23:59:59 UTC.

Table 2: actions

  • member_id INT
  • action_date DATE — UTC calendar date between 2020-02-01 and 2020-02-29
  • action STRING — either 'turn_on' or 'turn_off'

Assumptions:

  • Each row in actions is a notification-setting action that occurs after the snapshot in status_snapshot .
  • A member can have at most one action per day.
  • Members may appear only in actions (for example, new members created after the snapshot date).
  • The member's latest February action determines their final status; if a member has no February actions, keep the snapshot status.

Write SQL to return each member's current notification status as of 2020-02-29 23:59:59 UTC.

  • Output columns: member_id, current_status
  • Include every member who appears in either table.

Follow-up: Suppose actions no longer contains action_date. Under the assumption that every recorded action is a valid state transition from the member's previous state (so contradictory repeated actions such as turn_on when already on do not occur), write SQL or describe how you would infer the final status as of 2020-02-29 using only the snapshot plus the multiset of February actions.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Data Manipulation (SQL/Python)•More LinkedIn•More Data Scientist•LinkedIn Data Scientist•LinkedIn Data Manipulation (SQL/Python)•Data Scientist Data Manipulation (SQL/Python)
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.