|
|
The aim of spatial selection and analysis is to determine spatial relationships between one or more subjects in order to locate those elements in space. The results can then be used for decision‐making. Performing a query, a number of criteria have to be formulated. To do so, the following approaches are possible:
Queries can be performed on the entire data set or a subset of the data. Subsets are generated via
queries. A subquery is a SELECT statement that is incorporated in
a SELECT, SELECT...INTO ,
INSERT...INTO , DELETE ,
UPDATE statement or in another subquery. A subquery is
composed of three parts.
| Part | Description |
|---|---|
| Comparison | predicate and a comparison operator that compares the predicate with the result of the subquery. |
| Expression | An expression that is searched for in the result of the subquery. |
| SQL statement | A SELECT statement according to the usual format of the SELECT statement. It must be in parentheses. |
SELECT * FROM product WHERE product-ID IN (SELECT
product-ID FROM orders WHERE discount >= .25);
Fig. D: Classification of the query into direct query and manipulation
Fig. E: Splitting the direct query