diff --git a/sql/ase/get_region_ase_total.sql b/sql/ase/get_region_ase_total.sql index 0345ee7..7225ec3 100644 --- a/sql/ase/get_region_ase_total.sql +++ b/sql/ase/get_region_ase_total.sql @@ -45,7 +45,7 @@ with [p3] AS ( [population] FROM [socioec_data].[ca_dof].[projections_p3] WHERE - [projections_id] = 11 -- Vintage 2025 (2025.4.25) + [projections_id] = 16 -- Vintage 2026 (2026.03.13) AND [fips] = '06073' AND [year] = @year ) diff --git a/sql/hs_hh/get_jurisdiction_controls_hh.sql b/sql/hs_hh/get_jurisdiction_controls_hh.sql index 50ee0ef..a0b2343 100644 --- a/sql/hs_hh/get_jurisdiction_controls_hh.sql +++ b/sql/hs_hh/get_jurisdiction_controls_hh.sql @@ -9,13 +9,13 @@ with [dof] AS ( SELECT [year], CASE - WHEN [area_name] = 'Balance of County' THEN 'Unincorporated San Diego County' + WHEN [area_name] IN ('Balance of County', 'Unincorporated') THEN 'Unincorporated San Diego County' ELSE CONCAT('City of ', [area_name]) END AS [jurisdiction], [vacancy_rate] FROM [socioec_data].[ca_dof].[estimates_e8] WHERE - [estimates_id] = 24 -- E-8: January 2025 + [estimates_id] = 27 -- E-8: May 2025 AND [fips] = '06073' -- San Diego County AND [year] != 2020 -- Use the E-5 Estimates for 2020+ AND [area_name] NOT IN ('Total Incorporated' , 'Incorporated', 'County Total') @@ -26,14 +26,14 @@ with [dof] AS ( SELECT [year], CASE - WHEN [area_name] = 'Balance of County' THEN 'Unincorporated San Diego County' + WHEN [area_name] IN ('Balance of County', 'Unincorporated') THEN 'Unincorporated San Diego County' WHEN [area_name] = 'National City' THEN 'City of National City' ELSE CONCAT('City of ', REPLACE([area_name], ' City', '')) END AS [jurisdiction], [vacancy_rate] FROM [socioec_data].[ca_dof].[estimates_e5] WHERE - [estimates_id] = 25 -- E-5: Vintage 2025 (2025.5.1) + [estimates_id] = 29 -- E-5: Vintage 2026 (2026.5.1) AND [fips] = '06073' -- San Diego County AND [area_name] NOT IN ('Total Incorporated' , 'Incorporated', 'County Total') ) diff --git a/sql/pop_type/get_jurisdiction_controls_gq.sql b/sql/pop_type/get_jurisdiction_controls_gq.sql index 5f98b40..ac1d9ff 100644 --- a/sql/pop_type/get_jurisdiction_controls_gq.sql +++ b/sql/pop_type/get_jurisdiction_controls_gq.sql @@ -9,13 +9,13 @@ with [dof] AS ( SELECT [year], CASE - WHEN [area_name] = 'Balance of County' THEN 'Unincorporated San Diego County' + WHEN [area_name] IN ('Balance of County', 'Unincorporated') THEN 'Unincorporated San Diego County' ELSE CONCAT('City of ', [area_name]) END AS [jurisdiction], [group_quarters] FROM [socioec_data].[ca_dof].[estimates_e8] WHERE - [estimates_id] = 24 -- E-8: January 2025 + [estimates_id] = 27 -- E-8: May 2025 AND [fips] = '06073' -- San Diego County AND [year] != 2020 -- Use the E-5 Estimates for 2020+ AND [area_name] NOT IN ('Total Incorporated' , 'Incorporated', 'County Total') @@ -26,14 +26,14 @@ with [dof] AS ( SELECT [year], CASE - WHEN [area_name] = 'Balance of County' THEN 'Unincorporated San Diego County' + WHEN [area_name] IN ('Balance of County', 'Unincorporated') THEN 'Unincorporated San Diego County' WHEN [area_name] = 'National City' THEN 'City of National City' ELSE CONCAT('City of ', REPLACE([area_name], ' City', '')) END AS [jurisdiction], [group_quarters] FROM [socioec_data].[ca_dof].[estimates_e5] WHERE - [estimates_id] = 25 -- E-5: Vintage 2025 (2025.5.1) + [estimates_id] = 29 -- E-5: Vintage 2026 (2026.5.1) AND [fips] = '06073' -- San Diego County AND [area_name] NOT IN ('Total Incorporated' , 'Incorporated', 'County Total') ) diff --git a/sql/pop_type/get_jurisdiction_controls_hhp.sql b/sql/pop_type/get_jurisdiction_controls_hhp.sql index 2f4af2c..4f20f35 100644 --- a/sql/pop_type/get_jurisdiction_controls_hhp.sql +++ b/sql/pop_type/get_jurisdiction_controls_hhp.sql @@ -9,13 +9,13 @@ with [dof] AS ( SELECT [year], CASE - WHEN [area_name] = 'Balance of County' THEN 'Unincorporated San Diego County' + WHEN [area_name] IN ('Balance of County', 'Unincorporated') THEN 'Unincorporated San Diego County' ELSE CONCAT('City of ', [area_name]) END AS [jurisdiction], [household_population] FROM [socioec_data].[ca_dof].[estimates_e8] WHERE - [estimates_id] = 24 -- E-8: January 2025 + [estimates_id] = 27 -- E-8: May 2025 AND [fips] = '06073' -- San Diego County AND [year] != 2020 -- Use the E-5 Estimates for 2020+ AND [area_name] NOT IN ('Total Incorporated' , 'Incorporated', 'County Total') @@ -26,14 +26,14 @@ with [dof] AS ( SELECT [year], CASE - WHEN [area_name] = 'Balance of County' THEN 'Unincorporated San Diego County' + WHEN [area_name] IN ('Balance of County', 'Unincorporated') THEN 'Unincorporated San Diego County' WHEN [area_name] = 'National City' THEN 'City of National City' ELSE CONCAT('City of ', REPLACE([area_name], ' City', '')) END AS [jurisdiction], [household_population] FROM [socioec_data].[ca_dof].[estimates_e5] WHERE - [estimates_id] = 25 -- E-5: Vintage 2025 (2025.5.1) + [estimates_id] = 29 -- E-5: Vintage 2026 (2026.5.1) AND [fips] = '06073' -- San Diego County AND [area_name] NOT IN ('Total Incorporated' , 'Incorporated', 'County Total') )