All practice tasks

SQL Case

Cloud cost allocation: above segment average

Cloud cost allocation: Find completed events whose amount exceeds their team segment's completed-event average.

Schema

sql
CREATE TABLE cloud_cost_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 cloud_cost_objects (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL,
  category TEXT NOT NULL,
  parent_id INTEGER,
  created_at TEXT NOT NULL
);
CREATE TABLE cloud_cost_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 cloud_cost_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 cloud_cost_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

Cloud cost allocation: above segment average 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.