diff --git a/src/modules/dw/CountryProfile/sql.ts b/src/modules/dw/CountryProfile/sql.ts index 46f1fe6f..74362986 100644 --- a/src/modules/dw/CountryProfile/sql.ts +++ b/src/modules/dw/CountryProfile/sql.ts @@ -2,7 +2,7 @@ export default { population: 'SELECT value FROM fact.population_total WHERE di_id = ${id} AND year = ${start_year}', // gdp: 'SELECT value FROM fact.gdp_usd_2015 WHERE di_id = ${id} AND year = ${start_year}', - domesticResourcesOverTime: 'SELECT * FROM data_series.domestic WHERE di_id =${id} AND l1 = ${l1} AND year >= ${start_year} AND value is NOT NULL', + domesticResourcesOverTime: 'SELECT * FROM data_series.domestic WHERE di_id =${id} AND l1 = ${l1} AND year >= ${start_year} AND value is NOT NULL AND value > 0', spendingAllocation: 'SELECT l2, value, budget_type FROM data_series.domestic WHERE di_id = ${id} AND year = ${end_year} AND l1 = \'total-expenditure\' AND l2 IS NOT NULL AND value > 0', // tslint:disable-next-line:max-line-length domesticRevenue: 'SELECT value FROM data_series.domestic WHERE di_id =${id} AND budget_type = \'actual\' AND year = ${end_year} AND l1 = \'total-revenue-and-grants\' AND l2 = \'revenue\' AND l3 is NULL AND l4 is NULL',