Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Debugging a Timestamp Column

MediumSQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is Debugging a Timestamp Column. Start with the requirements and the one table on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

Given this dataframe, explore the timestamp column and explain what needs change.

Use the timestamp_events table to identify missing, malformed, date-only, timezone-free, and properly timezone-qualified values. Return the original value, its classification, a normalized timestamp where possible, and the recommended change.

Output

  1. One row per event, ordered by event_id.
  2. Columns: event_id, raw_timestamp, timestamp_status, normalized_timestamp, recommended_change.
  3. Preserve unparseable values as NULL in normalized_timestamp.

Schema

timestamp_events
ColumnTypeDescription
event_idPKINTUnique event identifier
source_systemVARCHAR(50)System that supplied the event
raw_timestampVARCHAR(50)Timestamp value as received from the source
Tablestimestamp_events
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results