Поля, не включённые в GROUP BY или аггрегатные функции (t.name и t2.name) берутся из первой попавшейся строки. Тут нужен сложный JOIN
SELECT `t1`.`code`, `t1`.`name`, `t1`.`max_int1`, `t2`.`name`, `t2`.`max_int2`
FROM (
SELECT `t`.`name` AS `name`, `t`.`code` AS `code`, `t`.`int1` AS `max_int1`
FROM (
SELECT `code`, MAX(`int1`) AS `int1`
FROM `table` WHERE `city`= :city GROUP BY `code`
) AS `m`
JOIN `table` AS `t` ON `t`.`city` = :city AND `t`.`code` = `m`.`code`
AND `t`.`int1` = `m`.`int1`
) AS `t1`
JOIN (
SELECT `t`.`name` AS `name`, `t`.`code` AS `code`, `t`.`int2` AS `max_int2`
FROM (
SELECT `code`, MAX(`int2`) AS `int2`
FROM `table` WHERE `city`= :city GROUP BY `code`
) AS `m`
JOIN `table` AS `t` ON `t`.`city` = :city AND `t`.`code` = `m`.`code`
AND `t`.`int2` = `m`.`int2`
) AS `t2` ON `t1`.`code` = `t2`.`code`