All practice tasks

SQL Case

Logistics network: lifetime and latest event

Logistics network: Return one row per carrier with completed lifetime value and latest completed event.

Schema

sql
CREATE TABLE logistics_accounts (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL,
  segment TEXT NOT NULL,
  region TEXT NOT NULL,
  created_at TEXT NOT NULL,
  active INTEGER NOT NULL
);
CREATE TABLE logistics_objects (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL,
  category TEXT NOT NULL,
  parent_id INTEGER,
  created_at TEXT NOT NULL
);
CREATE TABLE logistics_events (
  id INTEGER PRIMARY KEY,
  external_key TEXT NOT NULL,
  account_id INTEGER NOT NULL,
  object_id INTEGER,
  event_type TEXT NOT NULL,
  status TEXT NOT NULL,
  amount REAL NOT NULL,
  occurred_at TEXT NOT NULL
);
CREATE TABLE logistics_links (
  id INTEGER PRIMARY KEY,
  account_id INTEGER NOT NULL,
  object_id INTEGER NOT NULL,
  relation_type TEXT NOT NULL,
  started_at TEXT NOT NULL,
  ended_at TEXT
);
CREATE TABLE logistics_event_archive (
  id INTEGER PRIMARY KEY,
  account_id INTEGER NOT NULL,
  object_id INTEGER,
  event_type TEXT NOT NULL,
  status TEXT NOT NULL,
  amount REAL NOT NULL,
  occurred_at TEXT NOT NULL
);

What this task practices

Logistics network: lifetime and latest event is a sql case interview exercise that trains prompt interpretation, explicit assumptions, a concrete response, and a clear explanation of tradeoffs. The catalog marks it as hard difficulty. It focuses on Data Reasoning, Validation, Technical Reasoning. The signed-in workspace provides the tools for the round and evaluates the attempt against task-specific criteria. Reference solutions, hidden checks, evaluator instructions, and candidate work remain private.

Sign in to startThe workspace and evaluation open after sign in.