Attribute Query Example
Case Description
Query the distribution of provinces with a population greater than 30 million and GDP greater than 30,000 in 2014.
Data Description
The sample data is located in the ...\SampleData\ThematicMap\PopulationAndEconomic folder.
The dataset Province_R contains the population and GDP data of provinces in 2014.

- The sample data contains the above data information, but you need to download a separate installation package. For details, see Get Sample Data Package.
Main Operation Steps
- Open the PopulationAndEconomic.smwu workspace and add the dataset Province_R to the map.
- Click the Spatial Analysis tab -> Query group -> SQL Query dropdown menu -> SQL Query item.
- In the SQL Query dialog, confirm that the query data is the PopulationAndEconomic data source and the Province_R dataset.
- In the first default statement of the SQL Query expression input box, switch the default "SmID" field to the "Pop_2014" field, and enter "3000" in the judgment value input box.
- Click the Add clause button, switch the default "SmID" field to the "GDP_2014" field in the second statement, and enter "30000" in the judgment value input box.
- Check the Highlight in Map checkbox.
- Check Save Results, and set the result data data source to PopulationAndEconomic, and the dataset to QueryResult.
- Click the Query button, and the search results will be automatically displayed in Linked Views mode, as shown in the figure below.
Related Topics
Common Expressions for Building SQL Query
Function Description for Building SQL Query