Baselight
with infant_mortality as 
(select "year", avg(child_mortality)/10 as percentage_child_mortality_under_five
from @owid.under_five_mortality.owid_under_five_mortality_2
where country='Indonesia' AND "year" >= 1970 and "year" <= 2018
group by 1),
perc_female_secondary_education_country_year as (
SELECT
    economy, 
    year1, 
    value1
FROM @worldbank.world_development_indicators.se_sec_enrl_fe_zs,
LATERAL (VALUES
    ('1960', "yr1960"),
    ('1961', "yr1961"),
    ('1962', "yr1962"),
    ('1963', "yr1963"),
    ('1964', "yr1964"),
    ('1965', "yr1965"),
    ('1966', "yr1966"),
    ('1967', "yr1967"),
    ('1968', "yr1968"),
    ('1969', "yr1969"),
    ('1970', "yr1970"),
    ('1971', "yr1971"),
    ('1972', "yr1972"),
    ('1973', "yr1973"),
    ('1974', "yr1974"),
    ('1975', "yr1975"),
    ('1976', "yr1976"),
    ('1977', "yr1977"),
    ('1978', "yr1978"),
    ('1979', "yr1979"),
    ('1980', "yr1980"),
    ('1981', "yr1981"),
    ('1982', "yr1982"),
    ('1983', "yr1983"),
    ('1984', "yr1984"),
    ('1985', "yr1985"),
    ('1986', "yr1986"),
    ('1987', "yr1987"),
    ('1988', "yr1988"),
    ('1989', "yr1989"),
    ('1990', "yr1990"),
    ('1991', "yr1991"),
    ('1992', "yr1992"),
    ('1993', "yr1993"),
    ('1994', "yr1994"),
    ('1995', "yr1995"),
    ('1996', "yr1996"),
    ('1997', "yr1997"),
    ('1998', "yr1998"),
    ('1999', "yr1999"),
    ('2000', "yr2000"),
    ('2001', "yr2001"),
    ('2002', "yr2002"),
    ('2003', "yr2003"),
    ('2004', "yr2004"),
    ('2005', "yr2005"),
    ('2006', "yr2006"),
    ('2007', "yr2007"),
    ('2008', "yr2008"),
    ('2009', "yr2009"),
    ('2010', "yr2010"),
    ('2011', "yr2011"),
    ('2012', "yr2012"),
    ('2013', "yr2013"),
    ('2014', "yr2014"),
    ('2015', "yr2015"),
    ('2016', "yr2016"),
    ('2017', "yr2017"),
    ('2018', "yr2018"),
) AS year_values(year1, value1)
WHERE economy='IDN')
select year1 as "year"
       , ROUND(avg(value1),1) as percentage_female_secondary_education
       , ROUND(avg(percentage_child_mortality_under_five),1) as percentage_child_mortality_under_five
from perc_female_secondary_education_country_year f
     INNER JOIN infant_mortality m ON (f.year1=m."year")
where year1 >= '1970' AND year1 <= '2018'
group by year1
order by 1
yearpercentage_female_secondary_educationpercentage_child_mortality_under_five
197034.216.6
197136.516.1
197235.715.5
197335.915
197436.714.5
197538.314.1
197638.513.6
197738.713.2
197839.112.8
1979null12.5
1980null12.1
198140.111.7
198240.511.4
198341.911
198441.910.6
1985null10.3
1986null9.9
1987null9.5
1988449.2
198944.48.8
199044.98.4
199144.58
199244.67.7
199344.17.3
199445.27
199545.56.6
199645.76.3
1997null6
1998null5.8
199948.15.5
200048.55.2
200148.85
2002494.8
2003494.6
200449.15
2005494.2
200649.34
200749.43.9
2008493.7
2009493.6
201049.33.4
201149.13.3
201249.63.2
201348.13
201448.62.9
201548.82.8
201649.42.7
201749.22.6
201849.22.5

Share link

Anyone who has the link will be able to view this.