This question evaluates temporal data manipulation, state reconstruction from event logs, and handling data completeness and edge cases within the Data Manipulation (SQL/Python) domain.
You are given two tables that describe LinkedIn members' push-notification settings.
status(member_id INT, status VARCHAR)
2020-01-31
.
status
is either
'on'
or
'off'
.
actions(member_id INT, action_date DATE, action VARCHAR)
action
is either
'turn_on'
or
'turn_off'
.
Tasks:
2020-02-29
.
status
, members who appear only in
actions
(for example, new members), and members who appear in both tables.
actions
did not have
action_date
, explain whether the final status could still be reconstructed and what additional data or table design would be required.
Required output:
member_id, current_status