Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
Dealing with Unstructured Data
00:00
5 left

Dealing with Unstructured Data

MediumSQL · PostgreSQL

Problem

Tell me a time you had to deal with unstructured data?

For this SQL exercise, use the supplied transaction payloads and source labels. Write a query that extracts customer references, normalizes monetary values, parses supported date formats, and retains only usable transactions from 2025 onward.

Output

  1. One row per retained transaction with record_id, source_label, customer_reference, transaction_date, and amount.
  2. Ignore rows with a NULL customer reference, amount, or transaction date.
  3. Sort by record_id ascending.

Schema

raw_transactions
ColumnTypeDescription
record_idPKINTUnique raw transaction identifier
source_systemVARCHAR(40)System that supplied the payload
raw_payloadTEXTTransaction attributes stored as JSON text
source_dictionary
ColumnTypeDescription
source_systemPKVARCHAR(40)Source system code
source_labelVARCHAR(80)Readable source system label
Tablesraw_transactionssource_dictionary
Interviewer

Your question is Dealing with Unstructured Data. Start with the requirements and the two tables in the Question tab.

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.
CodePostgreSQL
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.