diff --git a/transform/sqlmesh_padelnomics/models/serving/location_profiles.sql b/transform/sqlmesh_padelnomics/models/serving/location_profiles.sql index 542a221..ff11934 100644 --- a/transform/sqlmesh_padelnomics/models/serving/location_profiles.sql +++ b/transform/sqlmesh_padelnomics/models/serving/location_profiles.sql @@ -218,10 +218,10 @@ country_market AS ( country_supply AS ( SELECT country_code, - SUM(city_padel_venue_count) AS country_venues, + SUM(padel_venue_count) AS country_venues, SUM(population) AS country_pop, 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 END AS venues_per_100k FROM foundation.dim_cities