SELECT c.name AS country_name, c.latitude, c.longitude, ccm.iso2 AS iso_code_for_map, -- Changed: Selecting the 2-letter code from the new table COUNT(j.job_id) AS number_of_open_postsFROM Countries AS c-- New Join: Connect to the country_code_mapping table using the 3-letter ISO codeJOIN country_code_mapping AS ccm ON LOWER(TRIM(c.iso3)) = LOWER(ccm.iso3)JOIN Job_Countries AS jc ON c.country_id = jc.country_idJOIN Jobs AS j ON jc.job_id = j.job_idWHERE j.status = 'published' AND j.date_closing > CURRENT_DATE AND c.iso3 IS NOT NULL AND TRIM(c.iso3) != '' AND c.latitude IS NOT NULL AND c.longitude IS NOT NULLGROUP BY c.country_id, c.name, c.latitude, c.longitude, ccm.iso2 -- Changed: Group by the new iso2 codeORDER BY number_of_open_posts DESC;