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

- The sample data includes the above data information, but you need to download a separate installation package. For details, see Get Sample Data Package.
Main Steps
- Open PopulationAndEconomic.smwu workspace and add the dataset Province_R to the map.
- Click the Spatial Analysis tab -> Query group->SQL Query drop-down menu->SQL Query item.
- In the SQL Query dialog, confirm the query data is the PopulationAndEconomic data source and Province_R dataset.
- In the first default statement of the SQL Query expression input box, switch the default "SmID" field to "Pop_2014" field, and enter "3000" in the judgment value input box.
- Click the Add clause button, and in the second statement, switch the default "SmID" field to "GDP_2014" field, and enter "30000" in the judgment value input box.
- Check the Highlight in Map checkbox.
- Check Save Results, and set the result 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 below.
Related Topics
Common Expressions for Building SQL Query
Function Description for Building SQL Query