Build the model from the spec, its categories’ items (from
items_sql, per category) and its inputs’ rows (from input_sql,
per input), evaluate every derived measure, and return one row per
derived cell: measures in declaration order, each one’s cells in item
order.