Keysproperty operations Corbelstone Residential

Vacant home

Which homes are vacant. Lettings counts a home as vacant when it is empty and available to let; finance counts every home that earns no rent, including homes closed for renovation. Until one is made canonical, every answer shows both.

Definition
vacant

Params: none · evaluated at Mon 20:00 · two meanings, no canonical one: both are shown

lettings · v1 · Head of Lettings

221

homes at Mon 20:00

Homes with an empty spell open at now, not under renovation.

lettings · changed 2026-11-01: First version.

Tests

  • count_between min 50.0 max 800.0
  • unique on unit_id

SQL

SELECT v.unit_id, v.building_id, v.vacant_from, date_diff('day', v.vacant_from, {now}) AS days_vacant
FROM unit_vacancies v JOIN units u ON u.id = v.unit_id
WHERE v.vacant_from <= {now} AND (v.let_at IS NULL OR v.let_at > {now}) AND u.status <> 'renovation'
ORDER BY v.unit_id

finance · v1 · Finance Controller

310

homes at Mon 20:00

Homes with no lease running at now, renovation included.

finance · changed 2026-11-01: First version.

Tests

  • count_between min 50.0 max 900.0
  • unique on unit_id

SQL

SELECT u.id AS unit_id, u.building_id, u.status
FROM units u
WHERE NOT EXISTS (SELECT 1 FROM leases l WHERE l.unit_id = u.id AND l.start_date <= {now}
                  AND (l.moved_out_at IS NULL OR l.moved_out_at > {now}))
ORDER BY u.id