SELECT
  cm.iso3 as ISO3, 
  cm.country_name_en  as Country, 
  IMPORT_PORT as Port, 
  IMPORT_LAT as Lat, 
  IMPORT_LON as lon, 
  EXTRACT(YEAR from IMPORT_DATE) as Year, 
  SUM(QUANTITY) as Quantity
FROM
  `fao-maps.fao_marcura.shipments_joined` sh,
   `fao-maps.fao_common_dimensions.dim_country` cm
WHERE 
  sh.IMPORT_ISO3CODE = cm.iso3  
GROUP BY 
  ISO3, 
  Country, 
  IMPORT_PORT, 
  IMPORT_LAT,
  IMPORT_LON, 
  Year
Order by 
  ISO3, 
  Country, 
  IMPORT_PORT, 
  Year