A query expression is a precise definition of what you want to select. Building a query expression is a powerful way to select features because an expression can include multiple attributes, operators, and calculations.
Remember to include single quotes around values in your expression that are text strings. If you choose a value from the Values box, the single quotes are added for you.
You can generate a simple set of statistics on a field by clicking Statistics. On the Select a field to get statistics dialog box, you can click the Use Query Results? check box to only calculate statistics on the selected records.
The results of a query can be saved to a text file using the Save button. In the Save dialog box, type the name of the file with a .txt extension.
How to build a query expression:
Click a layer in the legend to make it active.
Click the Query Builder button.
Click a field to query.
Click an operator to be used in the expression.
Click a sample value or type a value for the expression.
Verify that the query expression is correct.
Click Execute to perform the query.
Click a field in the Display Field dropdown to only show one field in the panel.
The results appear in the lower panel.
Click to select a value or values from the query results panel.
Click Highlight to make the selected feature(s) highlighted on the map.
Click Pan or Zoom to pan or zoom to the selected features.
Click Statistics.
Click a field to be used for statistics and click OK.
The statistics are shown in a separate dialog.
Click the Save button to save the query results to a text file.
Tip: The results of a query can be saved to a comma-delimited text file. The text file can then be used in another program, such as Microsoft Excel, to create a spreadsheet.