GITTA-Logo
PDF Version of this document Search Help Glossary

Lesson Navigation IconSpatial Queries

Unit Navigation IconIntroduction to spatial queries

Unit Navigation IconThematic query

LO Navigation IconRelational operators

LO Navigation IconArithmetic operators

LO Navigation IconLogical operators

LO Navigation IconCombination of operators

LO Navigation IconFormulate queries

Unit Navigation IconGeometric query

Unit Navigation IconTopological query

Unit Navigation IconSummary

Unit Navigation IconGlossary

Unit Navigation IconBibliography

Unit Navigation IconMetadata


GITTA/CartouCHe news:


Go to previous page Go to next page

Arithmetic operators

Arithmetic operators are used for numerical attributes. For example, there is the possibility to calculate the mean or the sum of attribute values from a series of objects. The following operators can be used as arithmetic operators: Multiplication (*), division (/), addition (+) and subtraction (‐) as well as the exponent operator (exp) and modulo operator (%).

Arithmetic operators
+
-
*
/
exp
%


The first five operators are self‐explanatory. The modulo operation gives the remainder from integer division. For example:
5 % 2 = 1
6 % 2 = 0

An example – arithmetic operators

INPUT

GraphicGraphic

Table ''Parcels: tree species (Baumart), stock (Vorrat), and soil type (Bodentyp)''Table ''Parcels: tree species (Baumart), stock (Vorrat), and soil type (Bodentyp)''

QUERY AND RESULT

SQL operator Result
SELECT Baumart, Vorrat, Bodentyp, Vorrat*2/100 as Holznutzung
FROM Parzelle
WHERE Vorrat > 120;
Top Go to previous page Go to next page