postgresqlのselectdistinctクエリにwhere句を入れようとしていますが、うまくいきません。
私は次のことをしたい:
select distinct on (state_or_county) state_or_county
from locations
where country = "USA"
私はこれをmysqlで何度も実行しましたが、なぜこれが機能しないのか理解できません。
誰かがクエリを修正できますか?または、それが機能しない理由を説明してください。