From d367d6f71bc525f7ccf871babf66667dda8913ee Mon Sep 17 00:00:00 2001 From: Dave Morris Date: Thu, 19 Feb 2015 00:14:10 +0000 Subject: [PATCH] Version 2.0 --- ADQL.tex | 1358 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1343 insertions(+), 15 deletions(-) diff --git a/ADQL.tex b/ADQL.tex index ac7c7a3..ca8e4dc 100644 --- a/ADQL.tex +++ b/ADQL.tex @@ -104,12 +104,12 @@ \section{Astronomical Data Query Language (ADQL)} for ADQL. The following conventions are used through this document: \begin{itemize} -\item Optional items are enclosed in meta symbols \verb:[: and \verb:]: -\item A group of items is enclosed in meta symbols \verb:{: and \verb:}: -\item Repetitive item (zero or more times) are followed by \verb:...: -\item Terminal symbols are enclosed by \verb:<: and \verb:>: -\item Terminals of meta-symbol characters (\verb:=,[,],(,),<,>,*:) are surrounded by quotes (\verb:“:) to distinguish them from meta-symbols -\item Case insensitiveness otherwise stated + \item Optional items are enclosed in meta symbols \verb:[: and \verb:]: + \item A group of items is enclosed in meta symbols \verb:{: and \verb:}: + \item Repetitive item (zero or more times) are followed by \verb:...: + \item Terminal symbols are enclosed by \verb:<: and \verb:>: + \item Terminals of meta-symbol characters (\verb:=,[,],(,),<,>,*:) are surrounded by quotes (\verb:“:) to distinguish them from meta-symbols + \item Case insensitiveness otherwise stated \end{itemize} \subsection{Characters, Keywords, Identifiers and Literals} @@ -154,7 +154,7 @@ \subsubsection{Keywords and Identifiers} to the following list: \begin{itemize} -\item SQL reserved keywords: + \item SQL reserved keywords: \end{itemize} \begin{verbatim} @@ -190,7 +190,7 @@ \subsubsection{Keywords and Identifiers} \end{verbatim} \begin{itemize} -\item ADQL reserved keywords: + \item ADQL reserved keywords: \end{itemize} \begin{verbatim} @@ -220,11 +220,17 @@ \subsubsection{Keywords and Identifiers} \subsubsection{Literals} -Finally we define the syntax rules for the different data types: string and number. A string literal is a character expression delimited by single quotes. Literal numbers are expressed in BNF as follows: +Finally we define the syntax rules for the different data types: string +and number. + +A string literal is a character expression delimited by single quotes. + +Literal numbers are expressed in BNF as follows: \begin{verbatim} ::= - | + + | ::= [ []] @@ -314,11 +320,11 @@ \subsubsection{Search condition} different types of reserved keywords or characters are used: \begin{itemize} -\item Standard comparison operators: \verb:=:, \verb:!=:, \verb:<>:, \verb:<:, \verb:>:, \verb:<=:, \verb:>=: -\item \verb:BETWEEN: -\item \verb:LIKE: -\item \verb:NULL: -\item \verb:EXISTS: + \item Standard comparison operators: \verb:=:, \verb:!=:, \verb:<>:, \verb:<:, \verb:>:, \verb:<=:, \verb:>=: + \item \verb:BETWEEN: + \item \verb:LIKE: + \item \verb:NULL: + \item \verb:EXISTS: \end{itemize} \subsection{Mathematical and Trigonometrical Functions} @@ -510,10 +516,1332 @@ \subsubsection{Overview} format. Currently STC/s (See [3] and [4]) is the only standardized string representation a service can declare. +As can also be seen in the following sections, all these functions +have arguments being a geometrical, a string and/or a numerical value +expression. When these values represent spherical coordinates the units MUST +be in degrees (square degrees for area). If the cartesian coordinate system +is used, the vector coordinates MUST be normalized. + +Regarding the legal ranges, for spherical coordinates, these SHOULD be [0, 360] +and [-90, 90]. In a cartesian coordinate system, there are no inherent limits +but the already mention constrain that vectors should be normalized. It remains +up to the service making use of ADQL to define the errors that should be raised +when using values outside these ranges. + +For all these functions there is also a string parameter defining the +coordinate system. The allowed values MUST be defined by any service making +use of ADQL. A list of standard coordinate system literals can be found in +the appendix of the STC specification [3]. + +Generally speaking, all these geometrical functions cover three different +topics: data types, predicates and utility calculations. Each of these are +covered below. + +%\subsubsubsection{Data Type Functions} + +Certain functions represent geometry data types. These data types are BOX, +CENTROID, CIRCLE, POINT and POLYGON together with the generalized REGION data +type. The functions are similarly named and return a variable length binary +value. The semantics of these data types are based on the corresponding +concepts from the STC data model (See [3]). + +Geometry data types are centered around the BNF construct +\verb:: which is central to data types within SQL. + +\begin{verbatim} + ::= + + | + | +\end{verbatim} + +A \verb:: does not simply cover data type functions +(POINT, CIRCLE etc) but must also allow for column values where a geometry +data type is stored in a column. Therefore, \verb:: +is expanded as + +\begin{verbatim} + ::= + + | +\end{verbatim} + +, where + +\begin{verbatim} + ::= + + | + | + | + | + | +\end{verbatim} + +and \verb:: makes possible to use a column reference. + +%\subsubsubsection{Predicate Functions} + +Functions CONTAINS and INTERSECTS each accept two geometry data types +and return 1 or 0 according to whether the relevant verb (e.g.: "contains") is +satisfied against the two input geometries; 1 represents true and 0 represents +false. Each of these functions can be assembled into a predicate: + +\begin{verbatim} + SELECT * FROM SDSS as s WHERE CONTAINS(POINT(...), CIRCLE(...)) = 1 +\end{verbatim} + +, where the ... would represent the constituent parts of a CIRCLE and POINT +geometry. + +One would expect later additions to ADQL to add to this range of functions. For +example: equals, disjoint, touches, crosses, within, overlaps and relate +are possibilities. + +%\subsubsubsection{Utility Functions} + +Function COORDSYS extracts the coordinate system string from a given geometry. To do so it accepts a geometry expression and returns a calculated string value. + +This function has been included as a string value function because it returns a simple string value. Hence + +\begin{verbatim} + :: = + | + + ::= + + ::= + COORDSYS +\end{verbatim} + +Other functions like AREA, COORD1, COORD2 and DISTANCE accept a geometry (or +two geometries in the case of DISTANCE) and return a calculated numeric value. + +The Predicate and most of the Utility functions have been included as numeric +value functions because they return simple numeric values. Thus + +\begin{verbatim} + ::= + + | + | + | +\end{verbatim} + +, where + +\begin{verbatim} + ::= + + | +\end{verbatim} + + +and + +\begin{verbatim} + ::= + AREA + | COORD1 + | COORD2 + | DISTANCE +\end{verbatim} + +and + +\begin{verbatim} + ::= | +\end{verbatim} + +The following sections provide a detailed description for each geometrical +function. Its functionality and usage is described rather than going into +the BNF grammar details as above. + +\subsubsection{AREA} + +This function computes the area, in square degrees, of a given geometry. + +For example, the area of a circle of one degree radius centered in a position +of (25.4, -20.0) degrees and defined according to the ICRS coordinate system +with GEOCENTER reference position would be written as follows: + +\begin{verbatim} + AREA(CIRCLE(‘ICRS GEOCENTER’, 25.4, -20.0, 1)) +\end{verbatim} + +The coordinates of the circle center could also be directly derived from +either a POINT function (See 2.4.12) or the coordinate’s column references: + +\begin{verbatim} + AREA(CIRCLE(‘ICRS GEOCENTER’, t.ra, t.dec, 1)) +\end{verbatim} + +, where \textit{t} would be the table and \textit{ra}, \textit{dec} the +column references for the circle centre. + +Inappropriate geometries for this construct (e.g. POINT) SHOULD either return +zero or throw an error message, the later to be defined by the service making +use of ADQL. + +\subsubsection{BOX} + +This function expresses a box on the sky. A box is a special case of Polygon, +defined purely for convenience, and it corresponds semantically to the STC Box +region ([3], section 4.5.1.5). It is specified by a center position and size +(in both coordinates) defining a cross centered on the center position and +with arms extending, parallel to the coordinate axes at the center position, +for half the respective sizes on either side. The box’s sides are line +segments or great circles intersecting the arms of the cross in its end +points at right angles with the arms. + +The function arguments specify the coordinate system, the center position +and both the width and height (arms) values, where + +\begin{itemize} + \item the coordinate system is a string value expression as defined in Section 2.4.1. + \item the center position is a comma separated numeric duple, with units and legal ranges as defined in Section 2.4.1. + \item and the arms are numeric value expressions in degrees. +\end{itemize} + +For example, a function expressing a box of ten degrees centered in a position +(25.4, -20.0) in degrees and defined according to the ICRS coordinate system +with GEOCENTER reference position would be written as follows: + +\begin{verbatim} + BOX(‘ICRS GEOCENTER’, 25.4, -20.0, 10, 10) +\end{verbatim} + +As another example, the coordinates of the center position could also be +extracted from either a POINT function (See 2.4.12) or the coordinate’s +column references: + +\begin{verbatim} + BOX(‘ICRS GEOCENTER’, t.ra, t.dec, 10, 10) +\end{verbatim} + +, where \textit{t} would be the table and \textit{ra}, \textit{dec} the +column references for the center position. + +To see what this function would return when listed in the select clause, +see Section 2.4.15. + +\subsubsection{CENTROID} + +This function computes the centroid of a given geometry and returns a POINT +(See 2.4.11). + +For example, the centroid of a circle of one degree radius centered in a +position of (25.4, -20.0) degrees and defined according to the ICRS coordinate +system with GEOCENTER reference position would be written as follows : + +\begin{verbatim} + CENTROID(CIRCLE (‘ICRS GEOCENTER’, 25.4, -20.0, 1)) +\end{verbatim} + +\subsubsection{CIRCLE} + +This function expresses a circular region on the sky (a cone in space) and +corresponds semantically to the STC Circle region ([3], section 4.5.1.2).. The +function arguments specify the coordinate system, the center position, +and the radius, where: + +\begin{itemize} + \item the coordinate system is a string value expression as defined in Section 2.4.1. + \item the center position is a comma separated numeric duple, with units and legal ranges as defined in Section 2.4.1. + \item and the radius is a numeric value expression in degrees. +\end{itemize} + +For example, a function expressing a circle of one degree radius centered in a +position of (25.4, -20.0) degrees and defined according to the ICRS coordinate +system with GEOCENTER reference position, would be written as follows: + +\begin{verbatim} + CIRCLE(‘ICRS GEOCENTER’, 25.4, -20.0, 1) +\end{verbatim} + +The coordinates of the center position could also be derived from either a +POINT function (See 2.4.12) or the coordinate’s column references: + +\begin{verbatim} + CIRCLE(‘ICRS GEOCENTER’, t.ra, t.dec, 1) +\end{verbatim} + +, where \textit{t} would be the table and \textit{ra}, \textit{dec} the +column references for the center position. + +To see what this function would return when listed in the select clause, see +Section 2.4.15. + +\subsubsection{CONTAINS} + +This numeric function determines if a geometry is wholly contained within +another. This is most commonly used to express the "point-in-shape" condition. + +For example, to determine if a point with right ascension of 25 degrees +and declination of -19.5 degrees according to the ICRS coordinate system +with GEOCENTER reference position is within a circle of one degree radius +centered in a position of (25.4, -20.0) degrees and defined according to the +same coordinate system, we would make use of the CONTAINS function as follows: + +\begin{verbatim} + CONTAINS( + POINT(‘ICRS GEOCENTER’, 25.0,-19.5), + CIRCLE(‘ICRS GEOCENTER’, 25.4, -20.0, 1) + ) +\end{verbatim} + +, where the CONTAINS function returns 1 (true) if the first argument is in +or on the boundary of the circle and 0 (false) otherwise. Thus, contains is +not symmetric in the meaning of the arguments. When used in the where clause +of a query, the value must be compared to 0 or 1 to form an SQL predicate: + +\begin{verbatim} + CONTAINS( + POINT(‘ICRS GEOCENTER’, 25.0,-19.5), + CIRCLE(‘ICRS GEOCENTER’, 25.4, -20.0, 1) + ) = 1 +\end{verbatim} + +for "does contain" and + +\begin{verbatim} + CONTAINS( + POINT(‘ICRS GEOCENTER’, 25.0,-19.5), + CIRCLE(‘ICRS GEOCENTER’, 25.4, -20.0, 1) + ) = 0 +\end{verbatim} + +for "does not contain". + +The arguments to the CONTAINS function can be (literal) values created +from the geometry types or they can be single column names or aliases (for +geometry stored in a database table). Since the two argument geometries may +be expressed in different coordinate systems, the function is responsible +for converting one (or both). If it cannot do so, it SHOULD throw an error +message, to be defined by the service making use of ADQL. + +\subsubsection{COORD1} + +This function extracts the first coordinate value, in degrees, of a given +POINT (See 2.4.12) or column reference. + +For example, the right ascension of a point with position (25, -19.5) in +degrees according to the ICRS coordinate system with GEOCENTER reference +position, would be obtained using the following expression: + +\begin{verbatim} + COORD1(POINT(‘ICRS GEOCENTER’, 25.0,-19.5)) +\end{verbatim} + +, being the result a numeric value of 25.0 degrees. The fist coordinate +could also be derived directly from a column reference as follows: + +\begin{verbatim} + COORD1(t.point) +\end{verbatim} + +, where \textit{t} is the table and \textit{point} the column reference for +the POINT geometry stored in the database table. + +\subsubsection{COORD2} + +This function extracts the second coordinate value, in degrees, of a given +POINT (See 2.4.12) or column reference. + +For example, the declination of a point with position (25, -19.5) in degrees +according to the ICRS coordinate system with GEOCENTER reference position, +would be obtained using the following expression: + +\begin{verbatim} + COORD2(POINT(‘ICRS GEOCENTER’, 25.0,-19.5)) +\end{verbatim} + +, being the result a numeric value of -19.5 degrees. The second coordinate +could also be derived directly from a column reference as follows: + +\begin{verbatim} + COORD2(t.point) +\end{verbatim} + +, where \textit{t} is the table and \textit{point} the column reference for +the POINT geometry stored in the database table. + +\subsubsection{COORDSYS} + +This function extracts the coordinate system string value from a given +geometry. + +As described in section 2.4.1, the allowed return values must be defined +by any service making use of ADQL, and a list of standard coordinate system +literals can be found in the STC specification [3]. + +For example, a function extracting the coordinate system of a point with +position (25, -19.5) in degrees according to the ICRS coordinate system with +GEOCENTER reference position, would be written as follows: + +\begin{verbatim} + COORDSYS(POINT(‘ICRS GEOCENTER’, 25.0,-19.5)) +\end{verbatim} + +, returning the ‘ICRS GEOCENTER’ string literal. As other samples above, +the coordinate system could also be derived from a column referencing any +other geometry data type: + +\begin{verbatim} + COORDSYS(t.circle) +\end{verbatim} + +, where \textit{t} is the table and \textit{circle} the column reference +for the CIRCLE geometry stored in the database table. +\subsubsection{DISTANCE} + +This function computes the arc length along a great circle between two points, +and returns a numeric value expression in degrees. + +For example, a function computing the distance between two points of +coordinates (25,-19.5) and (25.4,-20) both expressed according to the +ICRS coordinate system with GEOCENTER reference position, would be written +as follows: + +\begin{verbatim} + DISTANCE(POINT(‘ICRS GEOCENTER’,25.0,-19.5), + POINT(‘ICRS GEOCENTER’,25.4, -20.0)) +\end{verbatim} + +, where all numeric values and the returned arc-length are in degrees. + +The distance between two points could also be derived from two columns +referencing POINT geometries stored in the database tables as follows: + +\begin{verbatim} + DISTANCE(t.p1,t.p2) +\end{verbatim} + +, where \textit{t} would be the table and \textit{p1}, \textit{p2} the column +references for the POINT geometries. + +Since the two argument points may be expressed in different coordinate systems, +the function is responsible for converting one (or both). If it cannot do +so, it SHOULD throw an error message, to be defined by the service making +use of ADQL. + +\subsubsection{INTERSECTS} + +This numeric function determines if two geometry values overlap. This is +most commonly used to express a "shape-vs-shape" intersection test. + +For example, to determine whether a circle of one degree radius centered +in a position of (25.4, -20.0) degrees and defined according to the ICRS +coordinate system with GEOCENTER reference position overlaps with a box +of ten degrees centered in a position (20.0, -15.0) in degrees and defined +according to the same coordinate system, we would make use of the INTERSECTS +function as follows: + +\begin{verbatim} + INTERSECTS( + CIRCLE(‘ICRS GEOCENTER’, 25.4, -20.0, 1), + BOX(‘ICRS GEOCENTER’, 20.0, -15.0, 10, 10) + ) +\end{verbatim} + +, where the INTERSECTS function returns 1 (true) if the two arguments overlap +and 0 (false) otherwise. When used in the where clause of a query, the value +must be compared to 0 or 1 to form an SQL predicate: + +\begin{verbatim} + INTERSECTS(CIRCLE(‘ICRS GEOCENTER’, 25.4, -20.0, 1), + BOX(‘ICRS GEOCENTER’, 20.0, -15.0, 10, 10) + ) = 1 +\end{verbatim} + +for "does intersect" and + +\begin{verbatim} + INTERSECTS( + CIRCLE(‘ICRS GEOCENTER’, 25.4, -20.0, 1), + BOX(‘ICRS GEOCENTER’, 20.0, -15.0, 10, 10) + ) = 0 +\end{verbatim} + +for "does not intersect". + +The arguments to the INTERSECTS function can be (literal) values created from +the geometry types or they can be single column names or aliases (for geometry +stored in a database table). Note that if one of the arguments is a POINT, +intersects is equivalent to contains (with the point argument first). Unlike +CONTAINS, the function’s arguments are commutative, e.g. INTERSECTS(a, +b) is equivalent to INTERSECTS(b, a). Since the two argument points may +be expressed in different coordinate systems, the function is responsible +for converting one (or both). If it cannot do so, it SHOULD throw an error +message, to be defined by the service making use of ADQL. + +\subsubsection{POINT} + +This function expresses a single location on the sky, and corresponds +semantically to an STC SpatialCoord ([3], section 4.4.2). The arguments +specify the coordinate system and the position, where: + +\begin{itemize} + \item the coordinate system is a string value expression as defined in Section 2.4.1. + \item the position is a comma separated numeric duple, with units and legal ranges as defined in Section 2.4.1. +\end{itemize} + +For example, a function expressing a point with right ascension of 25 degrees +and declination of -19.5 degrees according to the ICRS coordinate system +with GEOCENTER reference position, would be written as follows: + +\begin{verbatim} + POINT(‘ICRS GEOCENTER’, 25.0,-19.5) +\end{verbatim} + +, where numeric values are in degrees. The coordinates of the POINT could +also be derived from the coordinate’s column references: + +\begin{verbatim} + POINT(‘ICRS GEOCENTER’, t.ra, t.dec) +\end{verbatim} + +, where \textit{t} would be the table and \textit{ra}, \textit{dec} the +column references for the position. + +The coordinates of a POINT could also be individually extracted using the +COORD1 and COORD2 functions (See 2.4.7 and 2.4.8). + +To see what this function would return when listed in the select clause, +see Section 2.4.15. + +\subsubsection{POLYGON} + +This function expresses a region on the sky with sides denoted by great +circles passing through specified coordinates. It corresponds semantically +to the STC Polygon region ([3], section 4.5.1.4). The arguments specify the +coordinate system and three or more sets of 2-D coordinates, where: + +\begin{itemize} + \item the coordinate system is a string value expression as defined in Section 2.4.1. + \item the coordinate sets are comma separated numeric duples, with units and legal ranges as defined in Section 2.4.1. +\end{itemize} + +For example, a function expressing a triangle, whose vertices are (10.0, +-10.5), (20.0, 20.5) and (30.0,30.5) in degrees according to the ICRS +coordinate system with GEOCENTER reference position, would be written +as follows: + +\begin{verbatim} + POLYGON(‘ICRS GEOCENTER’, 10.0, -10.5, 20.0, 20.5, 30.0, 30.5) +\end{verbatim} + +, where all numeric values are in degrees, + +As for other geometries like BOX, CIRCLE and POINT, one could also derive +the coordinates from database column references instead: + +\begin{verbatim} + POLYGON(‘ICRS GEOCENTER’, t.ra, t.dec, 20.0, 20.5, 30.0, 30.5) +\end{verbatim} + +, where t would be the table and ra, dec the column references for one of +the triangle’s corner position. + +Thus, the polygon is a list of vertices in a single coordinate system, with +each vertex connected to the next along a great circle and the last vertex +implicitly connected to the first vertex. + +\subsubsection{REGION} + +This function provides a generic way of expressing a region represented by +a single string input parameter. The format of the string MUST be specified +by a service that accepts ADQL by referring to a standard format. Currently +STC/s is the only standardized string representation a service can declare. + +For example, given a string serialization of an STC region, the REGION +function just embeds such literal within parenthesis in the following way: + +\begin{verbatim} + REGION(‘Convex ... Position ... Error ... Size’) +\end{verbatim} + +A detailed description on how to use STC/s can be seen in the referenced +document [4]. Inappropriate geometries for this construct SHOULD throw an +error message, to be defined by the service making use of ADQL. + +\subsubsection{Geometry in the SELECT clause} + +Geometry values (literals or columns containing geometry values) may be +listed in the select clause, in which case they must be converted into a +text form. This text form will be identical to the way a literal value would +be specified in a query, including the geometry type (POINT, CIRCLE, BOX, +or POLYGON) and all arguments but excluding the required quotes around the +coordinate system string. For example, the query + +\begin{verbatim} + SELECT circle(‘ICRS GEOCENTER’, 1, 2, 0.5) +\end{verbatim} + +could return + +\begin{verbatim} + CIRCLE(‘ICRS GEOCENTER ‘, 1.0, 2.0, 0.5) +\end{verbatim} + +or equivalent. The case of the coordinate system string should be preserved; +the geometry type string is case insensitive. The output may alter the +numeric format by converting whole numbers to floating point (as in the +example above) but should not gratuitously add digits. Otherwise, numeric +output must conform to the rules for numeric expressions in the ADQL BNF. + +\subsubsection{User Defined Functions} + +ADQL also provides a placeholder to define user specific functions. Such +construct supports a variable list of parameters as input in the following way: + +\begin{verbatim} + ::= + + [ + + [ + { + + }... + ] + ] + +\end{verbatim} + +The function names can be qualified with a prefix to ease parsing of the +ADQL statement + +\begin{verbatim} + ::= + [ ] +\end{verbatim} + +, while the function parameters are generic enough to support string, +numeric and geometrical expressions + +\begin{verbatim} + ::= +\end{verbatim} + +If metadata on a user defined function is available, this should be used. For +example function names and cardinality of arguments should be checked against +metadata where available. \appendix +\section{BNF Grammar} + +An easier to navigate version of the BNF grammar can be found at \url{http://www.ivoa.net/internal/IVOA/IvoaVOQL/adql-bnf-v2.0.html} + +\begin{verbatim} + + ::= + + | + | + + ::= + ABS + | ACOS + | AREA + | ASIN + | ATAN + | ATAN2 + | BOX + | CEILING + | CENTROID + | CIRCLE + | CONTAINS + | COORD1 + | COORD2 + | COORDSYS + | COS + | DEGREES + | DISTANCE + | EXP + | FLOOR + | INTERSECTS + | LOG + | LOG10 + | MOD + | PI + | POINT + | POLYGON + | POWER + | RADIANS + | REGION + | RAND + | ROUND + | SIN + | SQRT + | TOP + | TAN + | TRUNCATE + + ::= + | + + ::= + ABSOLUTE | ACTION | ADD | ALL + | ALLOCATE | ALTER | AND + | ANY | ARE + | AS | ASC + | ASSERTION | AT + | AUTHORIZATION | AVG + | BEGIN | BETWEEN | BIT | BIT_LENGTH + | BOTH | BY + | CASCADE | CASCADED | CASE | CAST + | CATALOG + | CHAR | CHARACTER | CHAR_LENGTH + | CHARACTER_LENGTH | CHECK | CLOSE | COALESCE + | COLLATE | COLLATION + | COLUMN | COMMIT + | CONNECT + | CONNECTION | CONSTRAINT + | CONSTRAINTS | CONTINUE + | CONVERT | CORRESPONDING | COUNT | CREATE | CROSS + | CURRENT + | CURRENT_DATE | CURRENT_TIME + | CURRENT_TIMESTAMP | CURRENT_USER | CURSOR + | DATE | DAY | DEALLOCATE + | DECIMAL | DECLARE | DEFAULT | DEFERRABLE + | DEFERRED | DELETE | DESC | DESCRIBE | DESCRIPTOR + | DIAGNOSTICS + | DISCONNECT | DISTINCT | DOMAIN | DOUBLE | DROP + | ELSE | END | END-EXEC | ESCAPE + | EXCEPT | EXCEPTION + | EXEC | EXECUTE | EXISTS + | EXTERNAL | EXTRACT + | FALSE | FETCH | FIRST | FLOAT | FOR + | FOREIGN | FOUND | FROM | FULL + | GET | GLOBAL | GO | GOTO + | GRANT | GROUP + | HAVING | HOUR + | IDENTITY | IMMEDIATE | IN | INDICATOR + | INITIALLY | INNER | INPUT + | INSENSITIVE | INSERT | INT | INTEGER | INTERSECT + | INTERVAL | INTO | IS + | ISOLATION + | JOIN + | KEY + | LANGUAGE | LAST | LEADING | LEFT + | LEVEL | LIKE | LOCAL | LOWER + | MATCH | MAX | MIN | MINUTE | MODULE + | MONTH + | NAMES | NATIONAL | NATURAL | NCHAR | NEXT | NO + | NOT | NULL + | NULLIF | NUMERIC + | OCTET_LENGTH | OF + | ON | ONLY | OPEN | OPTION | OR + | ORDER | OUTER + | OUTPUT | OVERLAPS + | PAD | PARTIAL | POSITION | PRECISION | PREPARE + | PRESERVE | PRIMARY + | PRIOR | PRIVILEGES | PROCEDURE | PUBLIC + | READ | REAL | REFERENCES | RELATIVE | RESTRICT + | REVOKE | RIGHT + | ROLLBACK | ROWS + | SCHEMA | SCROLL | SECOND | SECTION + | SELECT + | SESSION | SESSION_USER | SET + | SIZE | SMALLINT | SOME | SPACE | SQL | SQLCODE + | SQLERROR | SQLSTATE + | SUBSTRING | SUM | SYSTEM_USER + | TABLE | TEMPORARY + | THEN | TIME | TIMESTAMP + | TIMEZONE_HOUR | TIMEZONE_MINUTE + | TO | TRAILING | TRANSACTION + | TRANSLATE | TRANSLATION | TRIM | TRUE + | UNION | UNIQUE | UNKNOWN | UPDATE | UPPER | USAGE + | USER | USING + | VALUE | VALUES | VARCHAR | VARYING | VIEW + | WHEN | WHENEVER | WHERE | WITH | WORK | WRITE + | YEAR + | ZONE + + ::= + + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + + ::= & + + ::= E + + ::= AREA + + ::= [ AS ] + + ::= * + + ::= + [ NOT ] BETWEEN + AND + + ::= [ NOT ] + + ::= + | + +ZRQ + + ::= + + | AND + + ::= + BOX + + + + + + + ::= + + ::= + CENTROID + + + + ::= + + ::= + + | + + ::= | + + ::= + [ ... ] + [ + { + ... + [ ... ] + }... + ] + + ::= | + + ::= + CIRCLE + + + + + + ::= : + + ::= + + ::= [ { }... ] + + ::= [ ] + + ::= , + + ::= [ ... ] + + ::= | + + ::= [...] + + ::= + + | + | + | + | + | + + ::= + + + ::= + + + + + ::= || + + ::= + CONTAINS + + + + ::= COORD1 + + ::= COORD2 + + ::= + + ::= | + + ::= + + ::= + + ::= + + ::= + + ::= [ AS ] + + ::= +ZRQ + + ::= + + + ::= ... + + ::= + | + + ::= + + | + | + | + | + | + | + | + | + | + + ::= [ ] + + ::= + + ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 + + ::= + DISTANCE + + + + ::= .. + + ::= " + + ::= + + ::= = + + ::= + [ [ ] ] + | + + ::= EXISTS + + ::= + + ::= + COORDSYS + + + + ::= [ ] + + ::= + FROM + [ { }... ] + + ::= + + ::= + + [ ] + + + ::= + | + + ::= + + | + | + | + | + | + + ::= > + + ::= >= + + ::= GROUP BY + + ::= + + ::= + + [ { }... ] + + ::= HAVING + + ::= | + + ::= + [ NOT ] IN + + ::= + | + + ::= + { } ... + + ::= + INTERSECTS + + + + ::= + + ::= ON + + ::= | + + ::= + INNER | [ OUTER ] + + ::= + | + + ::= | + + ::= [ + + ::= ( + + ::= < + + ::= <= + + ::= + [ NOT ] LIKE + + ::= + + ::= + + ::= + ABS + | CEILING + | DEGREES + | EXP + | FLOOR + | LOG + | LOG10 + | MOD + + + | PI + | POWER + > +ZRQ + + | RADIANS + | RAND [ ] + | ROUND + [ ] + + | SQRT + | TRUNCATE + + [ ] + + + ::= - + + ::= + USING + + + + ::= + + ::= + + | + | + | + + ::= + + | + | + + ::= +ZRQ + + ::= +ZRQ + + ::= | + + ::= <> + + ::= != + + ::= IS [ NOT ] NULL + + ::= + | + + ::= + + | + + ::= + + | + | + + ::= + + | + | + | + + ::= ORDER BY + + ::= ASC | DESC + + ::= LEFT | RIGHT | FULL + + ::= + + ::= % + + ::= . + + ::= + + + ::= + POINT + + + + ::= + POLYGON + + + + { } ? + + + ::= + + | + | + | + | + | + + ::= | + + ::= + [ NATURAL ] [ ] JOIN + [ ] + + ::= | + + ::= + + | + + ::= + SELECT + [ ] + [ ] + + + + ::= ? + + ::= ' + + ::= + + ::= + + ::= + REGION + + ::= + ... + [ { | | }... ] + + ::= ] + + ::= ) + + ::= [ ] + + ::= + + | OR + + ::= + + | [ { }... ] + + ::= | + + ::= ; + + ::= { | | }... + + ::= + COUNT + | +ZRQ + + ::= AVG | MAX | MIN | SUM | COUNT + + ::= TOP + + ::= DISTINCT | ALL + + ::= | + + ::= [ ] + + ::= + + | + + ::= + a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z + + ::= + A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z + + ::= / + + ::= | + + ::= + [ ] + + ::= + [ { }... ] + + ::= + + ::= + + ::= + + ::= + | + + ::= + + ::= + + [ ] + [ ] + [ ] + [ ] + + ::= [ ] + + ::= + [ ] + | + | + + ::= + + ::= + + | + | + + ::= + | + + ::= + ACOS + | ASIN + | ATAN + | ATAN2 + + + | COS + | COT + | SIN + | TAN + + ::= _ + + ::= + + ::= ... + + ::= | + + ::= + | + + ::= + + ::= + + [ + + [ + { + + }... + ] + ] + + + ::= + [ ] + + ::= + + ::= + + | + | + + ::= + + | + | + | + + ::= | + + ::= WHERE + +\end{verbatim} + \section{Changes from Previous Versions} \subsection{Changes from ADQL-2.0}