Definitions
The definitions the operator and Ask both run on. Each has an owner, a version, SQL and tests. Edits make a new version.Detention
detention unit: USD canonical: financeWhat the carrier charges, per day, for keeping its container outside the terminal beyond the detention free days (from gate-out to the empty return).
financeFinance Controller · finance
v1canonical
Detention charges that started accruing in the period and at or before now.
latest change: First version.
- pass value_betweenobserved 302845.0, expected between 0.0 and 1000000.0
SQL, rendered for now
SELECT g.id AS charge_id, g.shipment_id, g.container_id, g.days, g.amount_usd, g.accrued_from FROM charges g WHERE g.kind = 'detention' AND g.accrued_from <= TIMESTAMP 'Tue 18:00:00' AND g.accrued_from >= TIMESTAMP 'Sun 18:00:00 (30 days ago)' AND g.accrued_from < TIMESTAMP 'Tue 18:00:00' ORDER BY g.accrued_from, g.id
History
append-only; nothing is edited in place- definitionFinance Controller finance v1 First version.