Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In ArcGIS 10.1 I am trying to do a Definition Query that will select the records that are the min values from a table.

I try a lot of type of query like and it still not working. Name table is Polygone_Buffer_Output Attribute : Air_Mil

"Air_Mil" = (SELECT MIN( "Air_Mil" ) FROM "Polygone_Buffer_Output"

[Air_Mil] = (SELECT MIN( [Air_Mil] ) FROM "Polygone_Buffer_Output"

[Air_Mil] = (SELECT MIN( [Air_Mil] ) FROM [Polygone_Buffer_Output]

"Air_Mil" in (SELECT MIN( "Air_Mil" ) FROM "Polygone_Buffer_Output"

Any ideas would be appreciated!


share|improve this question
A related post may be of help: – Aaron Jul 3 '13 at 19:34
What type of table (file, arcsde, dBase, personal) are you using? – PolyGeo Jul 3 '13 at 20:49
It's with file i'm not able to run my query. But in personal GDB i can execute the query with the advice of CLJ – user19717 Jul 30 '13 at 15:40
up vote 2 down vote accepted

"Air_Mil" in (SELECT MIN( "Air_Mil" ) FROM Polygone_Buffer_Output


[Air_Mil] in (SELECT MIN( [Air_Mil] ) FROM Polygone_Buffer_Output

using square brackets or quotes depends on your underlying database implementation.

share|improve this answer
Thanks, it's run with GDB but when it's only a shapefile a didn't find the way to execute my query – user19717 Jul 30 '13 at 15:42
Did you try both methods? What message did you get back from ArcGIS when you were trying to query shapefiles? – CLJ Jul 30 '13 at 16:28
It's telling me "There was a problem selecting", "An invalid SQL statement was used." Yes i try both methods and many other. Have you already able to make a query of this kind on a shapefile outside of GDB ? – user19717 Jul 31 '13 at 16:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.