Baselight
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
yearPortugalEuropean Union - 27 countries (from 2020)SwitzerlandSwedenIrelandGermanyNetherlands
2004511963127080279428
2005412367627575288478
2006812673528182301450
2007713177829896306435
20088137777340108325448
200911130760338137307405
20108139877383140334359
20118135828385143326337
20127137844370132339302
20139138833383122329348
201411141844399134317408
201514141859392131304422
201615140872357153303403
201715144870376137309411
201821148935399169322414
201926149964428177322400
202024148941427194311366
202128152977475199311375
2022301511044481226294384
2023311531086486202297395
2024331521112468209300393

Share link

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