lettings · v1 · Head of Lettings
562
bands at Mon 20:00
One row per building and bedroom count, from the band version valid at now.
lettings · changed 2026-11-01: First version.
Tests
- count_between min 300.0 max 700.0
SQL
SELECT rb.building_id, b.name AS building, rb.bedrooms, rb.band_low, rb.band_mid, rb.band_high,
round(rb.band_high * (1 + {floor_premium}), 2) AS top_floor_high, rb.version, {top_floors} AS top_floors
FROM rent_bands rb JOIN buildings b ON b.id = rb.building_id
WHERE rb.valid_from <= {now} AND (rb.valid_to IS NULL OR rb.valid_to > {now})
ORDER BY rb.building_id, rb.bedrooms