CÓMO
Note: This article applies to retired ArcGIS versions 9.x and 10.0. Later versions of ArcGIS may contain different functionality, as well as different names and locations for menus, commands and geoprocessing tools.
The instructions provided describe how to use subqueries in the SQL expression of the Select By Attributes window to access aggregate functions such as MIN and MAX. For example, a query that selects the maximum date in a date field.
Use GROUP BY subquery clauses to return values from aggregate functions on sets of values.
Note: Coverages, shapefiles, and other non geodatabase file-based data sources do not support subqueries. Subqueries performed on a versioned ArcSDE feature class that has been registered without the option to move edits to base do not return features stored in the delta tables. File geodatabases provide limited support for subqueries explained in this article, while personal and ArcSDE geodatabases provide full support. Refer to the database management system (DBMS) documentation for information on the full set of subquery capabilities of personal and ArcSDE geodatabases.
Use the following examples with geodatabase and ArcSDE feature classes and tables, as well as Access tables from an OLE DB Connection:
<date> = (SELECT MAX(date) FROM <table_name>)
<date> = (SELECT MIN(date) FROM <table_name>)
<date> = (SELECT MAX(date) FROM <table_name> GROUP BY <group_ID>)
<date> = (SELECT MIN(date) FROM <table_name> GROUP BY <group_ID>)
Obtener ayuda de expertos en ArcGIS
Descargar la aplicación de soporte de Esri