Baselight
Loading...Loading chart...
1
2WITH wages AS (
3  SELECT DISTINCT time_period::INTEGER as year, value as avg_wage
4  FROM "@eurostat.nama_10_fte.tidy" 
5  WHERE geo = 'Portugal'
6),
7housing AS (
8  SELECT year, rent_prices, price_to_income_ratio, real_house_price_idx
9  FROM "@owid.housing_prices.owid_housing_prices" 
10  WHERE country = 'Portugal' AND year >= 1995
11)
12SELECT 
13  w.year,
14  ROUND(w.avg_wage::NUMERIC, 0) as avg_wage_eur,
15  ROUND(h.rent_prices::NUMERIC, 2) as rent_index,
16  ROUND(h.price_to_income_ratio::NUMERIC, 1) as price_to_income_ratio,
17  ROUND(h.real_house_price_idx::NUMERIC, 1) as real_house_price_idx
18FROM wages w
19LEFT JOIN housing h ON w.year = h.year
20WHERE w.year IS NOT NULL
21GROUP BY w.year, w.avg_wage, h.rent_prices, h.price_to_income_ratio, h.real_house_price_idx
22ORDER BY w.year
23
yearavg_wage_eurrent_indexprice_to_income_ratioreal_house_price_idx
1995970661.45142.1123.2
1995949461.45142.1123.2
19961011063.27137.8121.7
19961035363.27137.8121.7
19971070365.70134.8122.4
19971080565.70134.8122.4
19981126667.38129.7124.7
19981119967.38129.7124.7
19991195668.32132.0132.6
20001259469.97134.8137.7
20011312971.87136.2139.9
20021360174.25131.7136.0
20031408376.03130.5132.7
20041440178.02127.3130.5
20051487379.89125.2128.5
20061510081.92124.3126.8
20071568984.12119.3123.2
20081609986.67107.9112.2
20091651989.00107.6114.7
20101675090.86106.9113.5
20111665391.71104.0106.0
20121623093.5598.896.7
20131662494.7297.394.0
20141637998.91101.197.8
201516451100.00100.0100.0
201616743101.71103.6106.0
201717116102.72110.5113.9
201817601104.66116.7123.6
201918518107.97123.2134.7
202018860110.76136.6145.9
202119851112.76142.0156.4
202221131115.79148.2164.3
202322933121.05151.1170.2

Share link

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