select * from (select p.province_name, p.province_code, c.city_name, c.city_code, c.city_id, ROW_NUMBER() OVER(PARTITION BY p.province_name order BY c.city_id DESC) AS r from hs_basic_province p left join hs_basic_city c on c.province_id = p.province…