のみmax(min_postal_code)
は、次の文を使用し、必要な場合。
select max(min_postal_code)
from (
select district, min(postal_code) AS min_postal_code
from address
where district is not null and district !="" and postal_code>0
group by district
order by district) t
MAX(min_postal_code)
の地区名も必要な場合。次のステートメントを使用します。
select *
from (select district, min(postal_code) AS min_postal_code
from address
where district is not null and district !="" and postal_code>0
group by district) t
where t.min_postal_code =
(
select max(min_postal_code)
from (select district, min(postal_code) AS min_postal_code
from address
where district is not null and district !="" and postal_code>0
group by district) t2
);
あなたの 'GROUP BY'リストにない' postal_code'カラムを選択しています。これを修正する必要があります。 –