Non-Spatial Queries#

🔙Back to Homepage

Manual selection#

  • Select the features manually in the attribute table by clicking on it.

Example: Manually select countries with the attribute table

Select by expression#

Comparison operators#

  • >, <, =, !=

Example: Select all cities with more than 20 million inhabitants in 2015: "2015" > 20000

Special operators#

  • LIKE

Example: Select all countries in Asia: "continent" LIKE 'asia'

Logical operators#

  • AND, OR

  • Can be used to combine different queries or criteria.

Example: Cities, not having a population of one million inhabitants in 1950, had surged to over 10 million inhabitants by 2015: "1950" < 1000 AND "2015" > 10000

Save selected features as a new file#

  • Layer-Properties -> Export -> Save only selected features

Example: Export selected features as a new file

Further resources#

You can access information about logical operators in QGIS documentation through the following link.

Select by expression options#

operator

functionality

+

addition

-

substraction

*

multiplication

/

division

%

remainder of division

operator

functionality

=

equals

!=

not equal

<

less than

>

greater than

<=

less than or equal to

>=

greater than or equal to

Operators such as AND, OR can be used to combine different queris or criteria

operator

functionality

AND

logical AND

OR

logical OR

NOT

logical NOT

operator

functionality

LIKE

pattern matching

IN

checks if a value is in a list of values

IS NULL

checks for null values

BETWEEN

checks if a value is within a specified range

CASE WHEN

conditional expressions