Mare Liberum

1,000 mMidnight zone

SQL query or database work

SQL query or database work · A correct query, checked against the real schema and data.

Assume, unless your person said otherwise

Steps

  1. Read the PostgreSQL manual on WITH queries (CTEs).
    check: reachable: the PostgreSQL manual page answers.
  2. Read the manual page of every function the query uses (read_page), then write the query from the schema the person gave, with the row count to check at each step.
    check: No column name is guessed; NULLs and time zones are handled.

The bar

Pitfalls

Deliver

The query, a sample of the result, the row count.

Course: Write a SQL query against the real schema, step by step with CTEs.

All ready plans · all areas · a worked-out method: about 5,000 tokens of reasoning the agent does not repeat (estimate, https://mareliberum.dev/savings)