Contracts signed (Sales) Draft
217
Trend * October 2026 so far: the data runs to 28.10.2026 18:00, so it is not a full month.
Breakdown
See the contracts →How it's calculated
Every signed contract, counted on the day it was signed. Owner: Sales.
Why other departments count differently →
Definition in metrics/leads.yml
name: contracts_sales
label: Contracts signed
noun: contracts
description: Every signed contract, counted on the day it was signed.
measure: lead_count
time_basis: contract_signed_at
owner: sales
certified: false
The number
select count(distinct lead_id) as value
from leads
where contract_signed_at >= timestamp '2026-09-01 00:00:00' at time zone 'Europe/Zurich'
and contract_signed_at < timestamp '2026-10-01 00:00:00' at time zone 'Europe/Zurich'The trend
select to_char(contract_signed_at at time zone 'Europe/Zurich', 'YYYY-MM') as period,
count(distinct lead_id) as value
from leads
where contract_signed_at >= timestamp '2026-04-01 00:00:00' at time zone 'Europe/Zurich'
and contract_signed_at < timestamp '2026-11-01 00:00:00' at time zone 'Europe/Zurich'
group by 1
order by 1The breakdown by broker
select broker as label,
count(distinct lead_id) as value
from leads
where contract_signed_at >= timestamp '2026-09-01 00:00:00' at time zone 'Europe/Zurich'
and contract_signed_at < timestamp '2026-10-01 00:00:00' at time zone 'Europe/Zurich'
group by 1
order by 2 desc, 1
limit 50
The app runs these queries with parameters; here the values are written in, so they can be read or pasted into psql.