Loading...Loading chart...
1SELECT *
2FROM (
3 SELECT time_period as year, geo, round(value) as rounded_value
4 FROM @eurostat.pat_ep_tot.tidy
5 WHERE freq = 'Annual'
6 AND unit = 'Per million inhabitants'
7 AND coop_ptn = 'Applicant'
8) AS src
9PIVOT (
10 SUM(rounded_value)
11 FOR geo IN ('Portugal',
12 'European Union - 27 countries (from 2020)',
13 'Switzerland',
14 'Sweden',
15 'Ireland',
16 'Germany',
17 'Netherlands')
18) AS p
19ORDER BY year