It seems like the author is using one query per country. Where it seems like you’d just group by country and year, where country <> US
You would need some unions to bolt on the additional aggregations, but it’s more like 4 queues, not 14
Eg
select c.ctry_name, i.year_nbr, sum(i.item_cnt) as tot_cnt, sum(i.invoice_amt) as tot_amt from country c inner join invoice i on (i.ctry_code = c.ctry_code) where c.ctry_name <> 'USA' group by c.ctry_name, i.year_nbr