Asq is the query engine of Smart World Professional.  It allows a couple things to happen in a command line interface.

  1. Search for locations such as Country, City or Street Address
  2. Query datasets or Smart City Layers via a SQL-like language

Think of Asq as the command line for Smart World Professional.  To access Asq, just click on the Asq button in the Dock.

The Asq query bar appear in the bottom of the screen.  You can simply start typing your query and hitting enter to see the results. 

Writing an Asq Query

As mentioned above, Asq is a SQL-like query tool.  This means that it generally follows the SQL language.  For example:

select * from my_dataset

You can also put in a WHERE clause:

select * from my_dataset where field_name = "value"

There are other supported operators as well including:

Greater than, less than or equal

select * from my_dataset where field_name > 50

Spatial queries

select * from my_dataset where radius('1km',point(-0.127758, 51.507351))

Combined queries with multiple operators

select * from my_dataset where field_name = "value and radius('1km',point(-0.127758, 51.507351))

Saving Asq Query

On the right of the query window you'll see an icon for saving Asq queries as layers.  This turns the saved Asq query into a Layer that you can then turn on and off as well as share with the project.

Query History

Past Asq queries are saved below the query bar.  To re-run a query, just click on it in the list and it will appear back in the Asq query tool.

Did this answer your question?