SELECT *
FROM (
SELECT time_period as year, geo, round(value) as rounded_value
FROM @eurostat.pat_ep_tot.tidy
WHERE freq = 'Annual'
AND unit = 'Per million inhabitants'
AND coop_ptn = 'Applicant'
) AS src
PIVOT (
SUM(rounded_value)
FOR geo IN ('Portugal',
'European Union - 27 countries (from 2020)',
'Switzerland',
'Sweden',
'Ireland',
'Germany',
'Netherlands')
) AS p
ORDER BY year