Summary
Many GIS users rely on manual methods to sift through vast datasets to identify specific features. However, instead of using manual methods, attribute queries or definition queries can be used to efficiently fetch or filter specific data. This approach saves a significant amount of time and effort.
Procedure
Attribute Query
- In ArcGIS Pro, open the Contents pane, right-click on the desired layer, and select Open Attribute Table.

- View the attribute table to check the data. In the attribute table, there is a Selection tab. Next to the Selection tab, is an option called Select By Attributes. Click this option to perform attribute-based selections.

- After opening the Select By Attributes tool, in the Input Rows field, select an input layer.
- In the Selection Type drop-down menu, choose the appropriate type of selection based on the criteria. For example, New selection, Add to the current selection, Remove from the current selection, etc.
Selection criteria
- Add to the current selection: Adds features to an already selected set without deselecting the existing ones.
- Remove from the current selection: Removes specific features from the already selected set.
- Select subset from the current selection: Narrows down the current selection by applying additional criteria.
- Switch the current selection: Selects all the features that are not currently selected and deselects the currently selected ones.
- Clear the current selection: Removes all selected features, leaving no active selection.


- In the Where clause, select the desired column name from which to filter the data. These menus and their values are specific to the underlying source data.
- Choose a criterion to define how the data should be filtered, for example:
- is equal
- is null
- is greater than
- Specify the value or condition that the data must meet to match your query.
If there are additional columns or conditions to include, add them as additional criteria. Click + Add Clause. Once the query is fully constructed, click Apply to execute it and OK to close the tool. The filtered data is now selected in the attribute table.

After running the attribute query, the desired output is visible on the Map View, highlighting the selected features. However, in the attribute table, it only highlights the selected attributes while still displaying all additional records. To view only the selected records, click the Show Selected Records option in the attribute table. This filters the table to display only the records that match the query.

Definition query
- Right-click the desired layer in the Contents pane and select Properties.
- In the Layer Properties window, navigate to the Definition Query tab.
- Click New Definition Query, and construct the query by selecting the desired fields, criteria, and values. Once the query is defined, click OK to apply it. The layer now displays only the features that meet the specified criteria.


- In the Definition Query tab, set up the same condition used earlier in the Select By Attributes query.
- After defining the query, click Apply and OK. The map now displays only the features that satisfy the defined condition.

After completing the definition query, only the features that match the defined condition are visible on the map, while the remaining features are filtered out. This helps in efficiently handling the data by focusing on the relevant subset, making it easier to analyze and visualize the desired output.

Even though the Show Selected Records option is not required, when you apply a definition query, the attribute table automatically filters out all the additional data. It only displays the features that meet the defined query criteria, making it easier to view and work with the selected records directly in the attribute table.
