6. Querying a Table

     6.1 Many Ways to Select Records

                |  |  | View | Chart

     6.2 Working with Selected Records

             Statistics |

6.3 Demo

Find a record in a table

Get a statistics about a table

Summarize a table

 

6. Querying a Table

 

6.1 Many Ways to Select Records

 

Finding a record in a table

 

Find  simply searches through the records in the table until it finds one with the particular attribute value you specify. When a record is found, it is selected and highlighted. ArcView also scrolls the table to ensure that the selected record is visible inside the table window.

 

Selecting records with the mouse or keyboard

 

The Select tool  can be used to select one or more records from a table. Hold down Shift key to select multiple records.

 

Selecting records using a query

 

Use the Query Builder  when you want to select records according to their values. For example, you can build a query to select all the records in which the value for a field named Price is greater or equal to $1000. You can also build more complex queries. You can also use the Query Builder to narrow down your selection from the set of records that is already selected, and to add additional records to this set.

 

Selecting records in a table by selecting features on a view

 

When you are working with a theme's table, selecting or deselecting the theme's features in the view also selects or deselects the records for these features in the table.

 

Selecting records using a chart

 

A chart contains one data marker for each selected record in the table. By erasing data markers in the chart you can deselect records in the table. In this way you can use the chart to focus in on particular records of interest. See Adding and erasing data markers on a chart.

 

6.2 Working with Selected Records

 

Getting statistics about a table

 

Use the Statistics option from the Field menu to obtain statistics about a particular field's values in a table. Statistics displays information for either all records or the currently selected records. You can only perform statistics on numeric fields. The following statistics are reported: Sum, Count, Mean, Maximum, Minimum, Range, Variance, Standard deviation.

 

Summarizing a table

 

You can summarize a table based on a particular field's values. The results are stored in a new table. If some records in the table are currently selected, only these records are summarized. If no records are selected, the whole table is summarized.

Summarize creates one record in the new table for each unique value of the field you chose. Each record contains a count showing how many records in the table being summarized have this value. Each record also contains the result of any summary statistics you requested in the Summarize dialog box, such as the sum, minimum. maximum and standard deviation for any other field in table.

 

 

Find a record in a table

 

Find air medical service company whose name starts with ¡°Mercy¡±.

 

a.       Make a theme active

b.      Open theme table

c.       From the Table menu, choose Find, or click the Find button .

d.      Type in the attribute value you wish to find.

e.       Press OK.

¡§ Find will search the table to find the first record with that attribute value.

 

 

 

Get a statistics about a table

 

Get a statistics of total population of census tracts for Erie county

 

a.       Make a theme active

b.      Open theme table

c.       Make a numeric field active by clicking the field bar

d.      Choose Statistics¡¦ from the Field menu

 

 

 

 

 

Summarize a table

 

How many fatal traffic crashes have occurred each month?

How many fatalities have been involved each month?

 

a.       Add a table from Project window (Click Add button when highlighting table)

b.      Click on the field to make it active

c.       Choose Summarize¡¦ from the Field menu, or click Summarize button

d.   In the Summarize dialog box, choose any related numeric field from the Fields list, Sum from the Summarize by list, and then press Add button, then press OK.

 

 

 

You can create the chart from the summary table as shown below.

 

 

Does a table contain duplicate values for a unique identifier?

 

a.       Click on the field such as ID field to make it active

b.      Click Summarize button.

c.       In the Summarize dialog box, press OK. (This will automatically open a summary table)

d.      Click the Count field in a Summary table

e.       Click the Sort Descending button .

f.        Check to see if the value of Count field is greater than 1.