fix(score): country_supply uses dim_cities.padel_venue_count (not city_padel_venue_count)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-03-10 10:09:30 +01:00
parent 9c5bed01f5
commit adf6f0c1ef

View File

@@ -218,10 +218,10 @@ country_market AS (
country_supply AS ( country_supply AS (
SELECT SELECT
country_code, country_code,
SUM(city_padel_venue_count) AS country_venues, SUM(padel_venue_count) AS country_venues,
SUM(population) AS country_pop, SUM(population) AS country_pop,
CASE WHEN SUM(population) > 0 CASE WHEN SUM(population) > 0
THEN SUM(city_padel_venue_count) * 100000.0 / SUM(population) THEN SUM(padel_venue_count) * 100000.0 / SUM(population)
ELSE 0 ELSE 0
END AS venues_per_100k END AS venues_per_100k
FROM foundation.dim_cities FROM foundation.dim_cities