<div dir="ltr">Hi Walter,<div>thank you for the PEG version and attached tests.</div><div><br></div><div>It&#39;s a bit say saying hallo to you from the VO perspective.</div><div><br></div><div>Best wishes for your new job!</div><div><br></div><div>Marco</div><div><div class="gmail_extra"><br><div class="gmail_quote">2018-01-12 6:49 GMT+01:00 Walter Landry <span dir="ltr">&lt;<a href="mailto:wlandry@caltech.edu" target="_blank">wlandry@caltech.edu</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Everyone,<br>
<br>
There was interest in the past in a PEG version of the ADQL grammar.<br>
I am attaching a PEG version of ADQL 2.0 and two sets of tests.  As<br>
discussed earlier, I had to make a number of modifications to the BNF<br>
to get an equivalent PEG grammar.  My tests are extensive but not<br>
comprehensive.  So I am somewhat confident, but not completely<br>
confident, that it parses everything according to the standard.<br>
<br>
To test it yourself, you can paste adql.peg into box 1 in<br>
<br>
  <a href="https://pegjs.org/online" rel="noreferrer" target="_blank">https://pegjs.org/online</a><br>
<br>
and adql_tests_pass.sql into box 2.  That will give you immediate<br>
feedback on whether the query parses.<br>
<br>
Normally, I would say that if you see any problems, please let me<br>
know.  However, my last day at IRSA is today, after which I will be<br>
moving to a position as a Research Software Engineer in quantum field<br>
theory.  If you need to contact me, my email address will not change.<br>
<br>
I have had a great time going to the IVOA meetings and seeing so many<br>
friendly, familiar faces.  I wish you all the best in working out<br>
these standards.<br>
<br>
Cheers,<br>
Walter Landry<br>
<br>/// A PEG grammar suitable for directly putting into PEGjs.<br>
<br>
queries = (space* query space* &#39;;&#39;)* space*<br>
<br>
unqualified_schema_name = identifier<br>
<br>
correlation_name = identifier<br>
correlation_specification = (&quot;AS&quot;i space)? space* correlation_name<br>
<br>
/// The spec says to have correlation_name as an alternate, but<br>
/// table_name matches everything that correlation name matches,<br>
/// so correlation_name will never match.<br>
qualifier = table_name<br>
<br>
/// I have to manually expand the possibilities in<br>
/// column_reference and table name, because a catalog.schema can<br>
/// match against schema.table or table.column, gobbling up the<br>
/// table or column name and making the parse fail.<br>
table_name =<br>
  (catalog_name &#39;.&#39; unqualified_schema_name &#39;.&#39; identifier)<br>
  / (unqualified_schema_name &#39;.&#39; identifier)<br>
  / identifier<br>
<br>
column_reference =<br>
  (catalog_name &#39;.&#39; unqualified_schema_name<br>
     &#39;.&#39; identifier &#39;.&#39; identifier)<br>
  / (unqualified_schema_name &#39;.&#39; identifier &#39;.&#39; identifier)<br>
  / (identifier &#39;.&#39; identifier)<br>
  / identifier<br>
catalog_name = identifier<br>
<br>
/// This puts term and numeric_value_expression on the left, not<br>
/// right.  Otherwise the rule greedily recurses on itself and<br>
/// runs out of stack space.  With that reordering, the first term<br>
/// is always the same and the second part becomes optional.<br>
term = factor (space* (&#39;*&#39; / &#39;/&#39;) space* term)?<br>
numeric_value_expression =<br>
  term (space* (&#39;+&#39; / &#39;-&#39;) space* numeric_value_expression)?<br>
<br>
string_value_function = string_geometry_function / user_defined_function<br>
<br>
string_geometry_function = extract_coordsys<br>
extract_coordsys = &#39;COORDSYS&#39;i space* &#39;(&#39; space* geometry_value_expression space* &#39;)&#39;<br>
<br>
/// Flipped the order here because a value_expression_primary can<br>
/// match a function name that should be matched by<br>
/// string_value_function<br>
character_primary = string_value_function / value_expression_primary<br>
character_factor = character_primary<br>
concatenation_operator = &#39;||&#39;<br>
/// Flip the order of character_factor and<br>
/// character_value_expression to prevent recursion.<br>
character_value_expression = character_factor<br>
   (space* concatenation_operator space* character_value_expression)?<br>
<br>
string_value_expression = character_value_expression<br>
<br>
concatenation_expression = character_factor space* concatenation_operator<br>
 space* character_value_expression<br>
<br>
/// This expression first checks for a concatenation operator.<br>
/// Otherwise a numeric_value_expression would match the first<br>
/// half of a concatenation, meaning the concatenation operator<br>
/// would cause the parse to fail.  We can not put<br>
/// string_value_expression first, because that would partially<br>
/// match arithmetic.  For &#39;a+b&#39;, it matches &#39;a&#39; but not the &#39;+&#39;.<br>
<br>
value_expression = concatenation_expression<br>
  / numeric_value_expression / string_value_expression / geometry_value_expression<br>
<br>
column_name = identifier<br>
<br>
as = value_expression space* (&#39;AS&#39;i space+)? column_name<br>
<br>
select_non_as_item = (qualifier &#39;.*&#39;) / value_expression<br>
select_item = as / select_non_as_item<br>
select_list = select_item (space* &#39;,&#39; space* select_item)*<br>
<br>
columns = &#39;*&#39; / select_list<br>
set_function_type = &#39;AVG&#39;i / &#39;MAX&#39;i / &#39;MIN&#39;i<br>
  / &#39;SUM&#39;i / &#39;COUNT&#39;i<br>
set_quantifier = (&#39;DISTINCT&#39;i / &#39;ALL&#39;i)<br>
  &amp;space<br>
/// The &#39;&amp;nonidentifier_character&#39; after set_function_type allows us<br>
/// to fail immediately if we get a set_function that does not have a<br>
/// parenthesis.<br>
general_set_function =<br>
  set_function_type &amp;nonidentifier_character<br>
  space* &#39;(&#39;<br>
  (space* set_quantifier)?<br>
  space* value_expression space* &#39;)&#39;<br>
<br>
set_function_specification<br>
= (&#39;COUNT&#39;i space* &#39;(&#39; space* &#39;*&#39; space* &#39;)&#39;)<br>
  / general_set_function<br>
<br>
when_operand = value_expression<br>
result_expression = value_expression<br>
result = result_expression / &#39;NULL&#39;i<br>
simple_when_clause = &#39;WHEN&#39;i<br>
  space+ when_operand<br>
  space+ &#39;THEN&#39;i<br>
  space+ result<br>
else_clause = &#39;ELSE&#39;i space+ result<br>
<br>
value_expression_primary =<br>
  unsigned_value_specification<br>
   / column_reference<br>
   / set_function_specification<br>
   / (&#39;(&#39; value_expression &#39;)&#39;)<br>
<br>
trig_function = ((&#39;ACOS&#39;i<br>
                  / &#39;ASIN&#39;i<br>
                  / &#39;ATAN&#39;i<br>
                  / &#39;COS&#39;i<br>
                  / &#39;COT&#39;i<br>
                  / &#39;SIN&#39;i<br>
                  / &#39;TAN&#39;i)<br>
                 &amp;nonidentifier_character)<br>
  space* &#39;(&#39;<br>
  space* numeric_value_expression<br>
  space* &#39;)&#39;<br>
  / (&#39;ATAN2&#39;i &amp;nonidentifier_character space* &#39;(&#39;<br>
     space* numeric_value_expression space* &#39;,&#39;<br>
     space* numeric_value_expression space* &#39;)&#39;)<br>
<br>
math_function = ((&#39;ABS&#39;i<br>
                  / &#39;CEILING&#39;i<br>
                  / &#39;DEGREES&#39;i<br>
                  / &#39;EXP&#39;i<br>
                  / &#39;FLOOR&#39;i<br>
                  / &#39;LOG10&#39;i<br>
                  / &#39;LOG&#39;i<br>
                  / &#39;RADIANS&#39;i<br>
                  / &#39;SQRT&#39;i)<br>
                 &amp;nonidentifier_character<br>
                 space* &#39;(&#39;<br>
                 space* numeric_value_expression<br>
                 space* &#39;)&#39;)<br>
  / ((&#39;MOD&#39;i / &#39;POWER&#39;i)<br>
     &amp;nonidentifier_character<br>
     space* &#39;(&#39;<br>
     space* numeric_value_expression<br>
     space* &#39;,&#39;<br>
     space* numeric_value_expression<br>
     space* &#39;)&#39;)<br>
  / (&#39;PI&#39;i &amp;nonidentifier_character<br>
     space* &#39;(&#39; space* &#39;)&#39;)<br>
  / (&#39;RAND&#39;i &amp;nonidentifier_character<br>
     space* &#39;(&#39;  numeric_value_expression? &#39;)&#39;)<br>
  / ((&#39;ROUND&#39;i / &#39;TRUNCATE&#39;i) &amp;nonidentifier_character<br>
     space* &#39;(&#39;<br>
     space* numeric_value_expression<br>
     (space* &#39;,&#39; space* signed_integer)?<br>
     space* &#39;)&#39;)<br>
<br>
/// default_function_prefix is a bit useless since it is optional.<br>
default_function_prefix = &#39;udf_&#39;<br>
<br>
user_defined_function_name = default_function_prefix?<br>
  regular_identifier<br>
<br>
user_defined_function_param = value_expression<br>
<br>
user_defined_function = user_defined_function_name<br>
  space* &#39;(&#39;<br>
  (space* user_defined_function_param<br>
    (space* &#39;,&#39; space* user_defined_function_param)*)<wbr>?<br>
  space* &#39;)&#39;<br>
<br>
numeric_value_function = trig_function / math_function<br>
  / user_defined_function / numeric_geometry_function<br>
/// Flipped the order here, because a value_expression can match a<br>
/// function name.<br>
numeric_primary = numeric_value_function / value_expression_primary<br>
factor = sign? numeric_primary<br>
coord_sys = string_value_expression<br>
<br>
column_or_number = column_reference / double<br>
<br>
coordinates = numeric_value_expression space* &#39;,&#39; space* numeric_value_expression<br>
point = &#39;POINT&#39;i<br>
  space* &#39;(&#39;<br>
  space* coord_sys<br>
  space* &#39;,&#39;<br>
  space* coordinates<br>
  space* &#39;)&#39;<br>
point_or_column = point / column_reference<br>
<br>
circle = &#39;CIRCLE&#39;i<br>
  space* &#39;(&#39; space*<br>
  coord_sys<br>
  space* &#39;,&#39;<br>
  space* coordinates<br>
  space* &#39;,&#39;<br>
  space* numeric_value_expression<br>
  space* &#39;)&#39;<br>
box = &#39;BOX&#39;i<br>
  space* &#39;(&#39;<br>
  space* coord_sys<br>
  space* &#39;,&#39;<br>
  space* coordinates<br>
  space* &#39;,&#39;<br>
  space* numeric_value_expression<br>
  space* &#39;,&#39;<br>
  space* numeric_value_expression<br>
  space* &#39;)&#39;<br>
<br>
centroid = &#39;CENTROID&#39;i space* &#39;(&#39; space* geometry_value_expression space* &#39;)&#39;<br>
region = &#39;REGION&#39;i space* &#39;(&#39; space* string_value_expression space* &#39;)&#39;<br>
<br>
coord_list = coordinates (space* &#39;,&#39; space* coordinates)*<br>
polygon = &#39;POLYGON&#39;i space*<br>
  &#39;(&#39; space* coord_sys<br>
  space* &#39;,&#39;<br>
  space* coord_list<br>
  space* &#39;)&#39;<br>
<br>
geometry_value_expression = value_expression_primary / geometry_value_function<br>
geometry_value_function = point / circle / box / polygon / centroid / region<br>
<br>
area = &#39;AREA&#39;i space* &#39;(&#39; space* geometry_value_expression space* &#39;)&#39;<br>
coord1 = &#39;COORD1&#39;i space* &#39;(&#39; space* coord_value space* &#39;)&#39;<br>
coord2 = &#39;COORD2&#39;i space* &#39;(&#39; space* coord_value space* &#39;)&#39;<br>
distance = &#39;DISTANCE&#39;i space* &#39;(&#39; space* coord_value space* &#39;,&#39; space* coord_value space* &#39;)&#39;<br>
coord_value = point / column_reference<br>
<br>
non_predicate_geometry_<wbr>function = area / coord1 / coord2 / distance<br>
<br>
contains = &#39;CONTAINS&#39;i<br>
  space* &#39;(&#39;<br>
  space* geometry_value_expression<br>
  space* &#39;,&#39;<br>
  space* geometry_value_expression<br>
  space* &#39;)&#39;<br>
intersects = &#39;INTERSECTS&#39;i<br>
  space* &#39;(&#39;<br>
  space* geometry_value_expression<br>
  space* &#39;,&#39;<br>
  space* geometry_value_expression space* &#39;)&#39;<br>
<br>
predicate_geometry_function = contains / intersects<br>
<br>
numeric_geometry_function = predicate_geometry_function / non_predicate_geometry_<wbr>function<br>
<br>
keyword = (ADQL_reserved_word / SQL_reserved_word) &amp;(!identifier_character)<br>
<br>
simple_Latin_letter = [a-zA-Z]<br>
identifier_character = digit / simple_Latin_letter / &#39;_&#39;<br>
/// nonidentifier_character is to signal that, for example, in an<br>
/// AND, clause, AND is followed by something that is not an<br>
/// identifier (e.g. a space or parentheses).<br>
nonidentifier_character = &amp;(!identifier_character) char<br>
all_identifiers = simple_Latin_letter identifier_character*<br>
regular_identifier = &amp;(!keyword) all_identifiers<br>
<br>
nondoublequote_character = &amp;(!&#39;&quot;&#39;) char<br>
delimited_identifier_part = nondoublequote_character / &#39;&quot;&quot;&#39;<br>
delimited_identifier_body = delimited_identifier_part+<br>
delimited_identifier = &#39;&quot;&#39; delimited_identifier_body &#39;&quot;&#39;<br>
<br>
identifier = regular_identifier / delimited_identifier<br>
<br>
join_specification = join_condition / named_columns_join<br>
<br>
join_condition = &#39;ON&#39;i space+ search_condition<br>
<br>
named_columns_join = &#39;USING&#39;i space+ &#39;(&#39;<br>
  space* join_column_list space* &#39;)&#39;<br>
<br>
join_column_list = column_name_list<br>
<br>
column_name_list = column_name (space* &#39;,&#39; space* column_name)*<br>
<br>
table_correlation = table_name (space* correlation_specification)?<br>
<br>
/// Joins are a bit circuitous because of the possibility of<br>
/// parentheses, but I think this is the same as the BNF<br>
<br>
outer_join = (&#39;LEFT&#39;i / &#39;RIGHT&#39;i / &#39;FULL&#39;i) &amp;space<br>
  (space* &#39;OUTER&#39;i &amp;space)?<br>
<br>
join_type = &#39;INNER&#39;i / outer_join<br>
<br>
join_suffix =<br>
  (&#39;NATURAL&#39;i space+)?<br>
  (join_type space+)?<br>
  &#39;JOIN&#39;i space+<br>
  table_reference (space* join_specification)?<br>
<br>
qualified_join = ((&#39;(&#39; space* joined_table space* &#39;)&#39;)<br>
                  / table_correlation)<br>
  (space* join_suffix)+<br>
<br>
joined_table = qualified_join / (&#39;(&#39; space* joined_table space* &#39;)&#39;)<br>
<br>
digit = [0-9]<br>
unsigned_integer = digit+<br>
exact_numeric_literal = (unsigned_integer (&#39;.&#39; unsigned_integer)?)<br>
  / (&#39;.&#39; unsigned_integer)<br>
<br>
sign = &#39;+&#39; / &#39;-&#39;<br>
signed_integer = sign? unsigned_integer<br>
mantissa = exact_numeric_literal<br>
exponent = signed_integer<br>
approximate_numeric_literal = mantissa (&#39;E&#39; / &#39;e&#39;) exponent<br>
unsigned_numeric_literal = approximate_numeric_literal / exact_numeric_literal<br>
<br>
double = sign? unsigned_numeric_literal<br>
<br>
quote = &#39;\&#39;&#39;<br>
literal_space = &#39; &#39;<br>
newline = &#39;\n&#39;<br>
tab = &#39;\t&#39;<br>
minus_sign = &#39;-&#39;<br>
char = .<br>
<br>
nonquote_character = &amp;(!quote) char<br>
character_representation = nonquote_character / &#39;\&#39;\&#39;&#39;<br>
<br>
comment_introducer = minus_sign minus_sign+<br>
comment_character = &amp;(!newline) char<br>
comment = comment_introducer comment_character* newline<br>
<br>
separator = comment / literal_space / newline<br>
space = separator<br>
<br>
/// String literals are implicitly concatenated when placed next to each other<br>
character_string_literal= quote character_representation* quote<br>
  (separator+ quote character_representation* quote)*<br>
<br>
general_literal = character_string_literal<br>
unsigned_literal = unsigned_numeric_literal / general_literal<br>
unsigned_value_specification = unsigned_literal<br>
derived_correlation = subquery space* correlation_specification<br>
<br>
table_reference = joined_table / table_correlation / derived_correlation<br>
<br>
from_clause = &#39;FROM&#39;i space+<br>
  table_reference (space* &#39;,&#39; space* table_reference)*<br>
<br>
comparison_predicate = value_expression<br>
  space* (&#39;=&#39; / &#39;!=&#39; / &#39;&lt;&gt;&#39; / &#39;&lt;=&#39; / &#39;&gt;=&#39; / &#39;&lt;&#39; / &#39;&gt;&#39;)<br>
  space* value_expression<br>
<br>
between_predicate = value_expression &amp;space<br>
  (space* &#39;NOT&#39;i &amp;space)?<br>
  space* &#39;BETWEEN&#39;i &amp;space<br>
  space* value_expression &amp;space<br>
  space* &#39;AND&#39;i &amp;space<br>
  space* value_expression<br>
<br>
in_predicate = value_expression &amp;space<br>
  (space* &#39;NOT&#39;i &amp;space)?<br>
  space* &#39;IN&#39;i &amp;space<br>
  space* (subquery<br>
          / (&#39;(&#39; space* (value_expression (space* &#39;,&#39; space* value_expression)*)<br>
             space* &#39;)&#39;))<br>
<br>
null_predicate = value_expression<br>
  space* (&#39;IS&#39;i &amp;space)<br>
  (space* &#39;NOT&#39;i &amp;space)?<br>
  space* &#39;NULL&#39;i<br>
<br>
match_value = character_value_expression<br>
pattern = character_value_expression<br>
<br>
like_predicate = match_value<br>
  (space* &#39;NOT&#39;i &amp;space)?<br>
  space* &#39;LIKE&#39;i space+ pattern<br>
<br>
exists_predicate= &#39;EXISTS&#39;i space+ subquery<br>
<br>
predicate = comparison_predicate / between_predicate / in_predicate<br>
  / null_predicate / like_predicate / exists_predicate<br>
<br>
where = &#39;WHERE&#39;i space+ search_condition<br>
<br>
grouping_column_reference = column_reference<br>
grouping_column_reference_list = grouping_column_reference<br>
  (space* &#39;,&#39; space* column_reference)*<br>
group_by_clause = &#39;GROUP&#39;i &amp;space<br>
  space* &#39;BY&#39;i &amp;space<br>
  space* grouping_column_reference_list<br>
<br>
having_clause = &#39;HAVING&#39;i &amp;space<br>
  space* search_condition<br>
<br>
sort_key = column_name / unsigned_integer<br>
ordering_specification = &#39;ASC&#39;i / &#39;DESC&#39;i<br>
/// I have the vague feeling that there are cases where there are<br>
/// no spaces between the sort_key and ordering_specification, but<br>
/// I can not think of any.<br>
sort_specification = sort_key (space+ ordering_specification)?<br>
sort_specification_list = sort_specification<br>
   (space* &#39;,&#39; space* sort_specification)*<br>
order_by_clause = &#39;ORDER&#39;i &amp;space<br>
  space* &#39;BY&#39;i &amp;space<br>
  space* sort_specification_list<br>
<br>
query = &#39;SELECT&#39;i<br>
  (space+ set_quantifier)?<br>
  (space+ &#39;TOP&#39;i space+ unsigned_integer)?<br>
  space+ columns<br>
  space+ from_clause<br>
  (space+ where)?<br>
  (space+ group_by_clause)?<br>
  (space+ having_clause)?<br>
  (space+ order_by_clause)?<br>
<br>
subquery = &#39;(&#39; space* (query / joined_table) space* &#39;)&#39;<br>
<br>
/// Reverse sort to avoid early matches.<br>
ADQL_reserved_word = &#39;TRUNCATE&#39;i / &#39;TOP&#39;i<br>
                        / &#39;SQRT&#39;i / &#39;SIN&#39;i<br>
                        / &#39;ROUND&#39;i / &#39;REGION&#39;i<br>
                        / &#39;RAND&#39;i / &#39;RADIANS&#39;i<br>
                        / &#39;POWER&#39;i / &#39;POLYGON&#39;i<br>
                        / &#39;POINT&#39;i / &#39;PI&#39;i<br>
                        / &#39;MOD&#39;i / &#39;LOG10&#39;i<br>
                        / &#39;LOG&#39;i / &#39;INTERSECTS&#39;i<br>
                        / &#39;FLOOR&#39;i / &#39;EXP&#39;i<br>
                        / &#39;DISTANCE&#39;i<br>
                        / &#39;DEGREES&#39;i / &#39;COS&#39;i<br>
                        / &#39;COORDSYS&#39;i / &#39;COORD2&#39;i<br>
                        / &#39;COORD1&#39;i / &#39;CONTAINS&#39;i<br>
                        / &#39;CIRCLE&#39;i / &#39;CENTROID&#39;i<br>
                        / &#39;CEILING&#39;i / &#39;BOX&#39;i<br>
                        / &#39;ATAN2&#39;i / &#39;ATAN&#39;i<br>
                        / &#39;ASIN&#39;i / &#39;AREA&#39;i<br>
                        / &#39;ACOS&#39;i / &#39;ABS&#39;i<br>
<br>
/// Split up SQL_reserved_word to help memory usage and compile times.<br>
SQL_reserved_word_00 = &#39;ZONE&#39;i / &#39;YEAR&#39;i<br>
                          / &#39;WRITE&#39;i / &#39;WORK&#39;i<br>
                          / &#39;WITH&#39;i / &#39;WHERE&#39;i<br>
                          / &#39;WHENEVER&#39;i / &#39;WHEN&#39;i<br>
                          / &#39;VIEW&#39;i / &#39;VARYING&#39;i<br>
                          / &#39;VARCHAR&#39;i<br>
                          / &#39;VALUES&#39;i / &#39;VALUE&#39;i<br>
                          / &#39;USING&#39;i / &#39;USER&#39;i<br>
                          / &#39;USAGE&#39;i<br>
<br>
SQL_reserved_word_01<br>
      = &#39;UPPER&#39;i / &#39;UPDATE&#39;i<br>
         / &#39;UNKNOWN&#39;i / &#39;UNIQUE&#39;i<br>
         / &#39;UNION&#39;i / &#39;TRUE&#39;i<br>
         / &#39;TRIM&#39;i / &#39;TRANSLATION&#39;i<br>
         / &#39;TRANSLATE&#39;i / &#39;TRANSACTION&#39;i<br>
         / &#39;TRAILING&#39;i / &#39;TO&#39;i<br>
         / &#39;TIMEZONE_MINUTE&#39;i / &#39;TIMEZONE_HOUR&#39;i<br>
         / &#39;TIMESTAMP&#39;i<br>
<br>
SQL_reserved_word_02<br>
      = &#39;TIME&#39;i / &#39;THEN&#39;i<br>
         / &#39;TEMPORARY&#39;i / &#39;TABLE&#39;i<br>
         / &#39;SYSTEM_USER&#39;i / &#39;SUM&#39;i<br>
         / &#39;SUBSTRING&#39;i / &#39;SQLSTATE&#39;i<br>
         / &#39;SQLERROR&#39;i / &#39;SQLCODE&#39;i<br>
         / &#39;SQL&#39;i / &#39;SPACE&#39;i<br>
         / &#39;SOME&#39;i / &#39;SMALLINT&#39;i<br>
         / &#39;SIZE&#39;i / &#39;SET&#39;i<br>
<br>
SQL_reserved_word_03<br>
      = &#39;SESSION_USER&#39;i / &#39;SESSION&#39;i<br>
         / &#39;SELECT&#39;i / &#39;SECTION&#39;i<br>
         / &#39;SECOND&#39;i / &#39;SCROLL&#39;i<br>
         / &#39;SCHEMA&#39;i / &#39;ROWS&#39;i<br>
         / &#39;ROLLBACK&#39;i / &#39;RIGHT&#39;i<br>
         / &#39;REVOKE&#39;i / &#39;RESTRICT&#39;i<br>
         / &#39;RELATIVE&#39;i / &#39;REFERENCES&#39;i<br>
         / &#39;REAL&#39;i / &#39;READ&#39;i<br>
<br>
SQL_reserved_word_10<br>
      = &#39;PUBLIC&#39;i / &#39;PROCEDURE&#39;i<br>
         / &#39;PRIVILEGES&#39;i / &#39;PRIOR&#39;i<br>
         / &#39;PRIMARY&#39;i / &#39;PRESERVE&#39;i<br>
         / &#39;PREPARE&#39;i / &#39;PRECISION&#39;i<br>
         / &#39;POSITION&#39;i / &#39;PARTIAL&#39;i<br>
         / &#39;PAD&#39;i / &#39;OVERLAPS&#39;i<br>
         / &#39;OUTPUT&#39;i / &#39;OUTER&#39;i<br>
         / &#39;ORDER&#39;i / &#39;OR&#39;i<br>
<br>
SQL_reserved_word_11<br>
      = &#39;OPTION&#39;i / &#39;OPEN&#39;i<br>
         / &#39;ONLY&#39;i / &#39;ON&#39;i / &#39;OF&#39;i<br>
         / &#39;OCTET_LENGTH&#39;i / &#39;NUMERIC&#39;i<br>
         / &#39;NULLIF&#39;i / &#39;NULL&#39;i<br>
         / &#39;NOT&#39;i / &#39;NO&#39;i<br>
         / &#39;NEXT&#39;i / &#39;NCHAR&#39;i<br>
         / &#39;NATURAL&#39;i / &#39;NATIONAL&#39;i<br>
<br>
SQL_reserved_word_12 = &#39;NAMES&#39;i / &#39;MONTH&#39;i<br>
                          / &#39;MODULE&#39;i / &#39;MINUTE&#39;i<br>
                          / &#39;MIN&#39;i / &#39;MAX&#39;i<br>
                          / &#39;MATCH&#39;i / &#39;LOWER&#39;i<br>
                          / &#39;LOCAL&#39;i / &#39;LIKE&#39;i<br>
                          / &#39;LEVEL&#39;i / &#39;LEFT&#39;i<br>
                          / &#39;LEADING&#39;i / &#39;LAST&#39;i<br>
                          / &#39;LANGUAGE&#39;i / &#39;KEY&#39;i<br>
<br>
SQL_reserved_word_13<br>
      = &#39;JOIN&#39;i / &#39;ISOLATION&#39;i<br>
         / &#39;IS&#39;i / &#39;INTO&#39;i<br>
         / &#39;INTERVAL&#39;i / &#39;INTERSECT&#39;i<br>
         / &#39;INTEGER&#39;i / &#39;INT&#39;i<br>
         / &#39;INSERT&#39;i / &#39;INSENSITIVE&#39;i<br>
         / &#39;INPUT&#39;i / &#39;INNER&#39;i<br>
         / &#39;INITIALLY&#39;i / &#39;INDICATOR&#39;i<br>
         / &#39;IN&#39;i / &#39;IMMEDIATE&#39;i<br>
<br>
SQL_reserved_word_20 = &#39;IDENTITY&#39;i / &#39;HOUR&#39;i<br>
                          / &#39;HAVING&#39;i / &#39;GROUP&#39;i<br>
                          / &#39;GRANT&#39;i / &#39;GOTO&#39;i<br>
                          / &#39;GO&#39;i / &#39;GLOBAL&#39;i<br>
                          / &#39;GET&#39;i / &#39;FULL&#39;i<br>
                          / &#39;FROM&#39;i / &#39;FOUND&#39;i<br>
                          / &#39;FOREIGN&#39;i / &#39;FOR&#39;i<br>
                          / &#39;FLOAT&#39;i / &#39;FIRST&#39;i<br>
<br>
SQL_reserved_word_21<br>
      = &#39;FETCH&#39;i / &#39;FALSE&#39;i<br>
         / &#39;EXTRACT&#39;i / &#39;EXTERNAL&#39;i<br>
         / &#39;EXISTS&#39;i / &#39;EXECUTE&#39;i<br>
         / &#39;EXEC&#39;i / &#39;EXCEPTION&#39;i<br>
         / &#39;EXCEPT&#39;i / &#39;ESCAPE&#39;i<br>
         / &#39;END-EXEC&#39;i / &#39;END&#39;i<br>
         / &#39;ELSE&#39;i / &#39;DROP&#39;i<br>
         / &#39;DOUBLE&#39;i / &#39;DOMAIN&#39;i<br>
<br>
SQL_reserved_word_22<br>
      = &#39;DISTINCT&#39;i / &#39;DISCONNECT&#39;i<br>
         / &#39;DIAGNOSTICS&#39;i / &#39;DESCRIPTOR&#39;i<br>
         / &#39;DESCRIBE&#39;i / &#39;DESC&#39;i<br>
         / &#39;DELETE&#39;i / &#39;DEFERRED&#39;i<br>
         / &#39;DEFERRABLE&#39;i / &#39;DEFAULT&#39;i<br>
         / &#39;DECLARE&#39;i / &#39;DECIMAL&#39;i<br>
         / &#39;DEALLOCATE&#39;i / &#39;DAY&#39;i<br>
         / &#39;DATE&#39;i / &#39;CURSOR&#39;i<br>
<br>
SQL_reserved_word_23<br>
      = &#39;CURRENT_USER&#39;i / &#39;CURRENT_TIMESTAMP&#39;i<br>
         / &#39;CURRENT_TIME&#39;i / &#39;CURRENT_DATE&#39;i<br>
         / &#39;CURRENT&#39;i / &#39;CROSS&#39;i<br>
         / &#39;CREATE&#39;i / &#39;COUNT&#39;i<br>
         / &#39;CORRESPONDING&#39;i / &#39;CONVERT&#39;i<br>
         / &#39;CONTINUE&#39;i / &#39;CONSTRAINTS&#39;i<br>
         / &#39;CONSTRAINT&#39;i / &#39;CONNECTION&#39;i<br>
         / &#39;CONNECT&#39;i / &#39;COMMIT&#39;i<br>
<br>
SQL_reserved_word_30<br>
      = &#39;COLUMN&#39;i / &#39;COLLATION&#39;i<br>
         / &#39;COLLATE&#39;i / &#39;COALESCE&#39;i<br>
         / &#39;CLOSE&#39;i / &#39;CHECK&#39;i<br>
         / &#39;CHAR_LENGTH&#39;i / &#39;CHARACTER_LENGTH&#39;i<br>
         / &#39;CHARACTER&#39;i / &#39;CHAR&#39;i<br>
         / &#39;CATALOG&#39;i / &#39;CAST&#39;i<br>
         / &#39;CASE&#39;i / &#39;CASCADED&#39;i<br>
         / &#39;CASCADE&#39;i / &#39;BY&#39;i<br>
<br>
SQL_reserved_word_31 = &#39;BOTH&#39;i / &#39;BIT_LENGTH&#39;i<br>
                          / &#39;BIT&#39;i / &#39;BETWEEN&#39;i<br>
                          / &#39;BEGIN&#39;i / &#39;AVG&#39;i<br>
                          / &#39;AUTHORIZATION&#39;i<br>
                          / &#39;AT&#39;i / &#39;ASSERTION&#39;i<br>
                          / &#39;ASC&#39;i / &#39;AS&#39;i<br>
                          / &#39;ARE&#39;i / &#39;ANY&#39;i<br>
                          / &#39;AND&#39;i / &#39;ALTER&#39;i<br>
                          / &#39;ALLOCATE&#39;i<br>
<br>
SQL_reserved_word_32 = &#39;ALL&#39;i / &#39;ADD&#39;i<br>
                          / &#39;ACTION&#39;i<br>
                          / &#39;ABSOLUTE&#39;i<br>
<br>
SQL_reserved_word_0 = SQL_reserved_word_00 / SQL_reserved_word_01<br>
                         / SQL_reserved_word_02 / SQL_reserved_word_03<br>
<br>
SQL_reserved_word_1 = SQL_reserved_word_10 / SQL_reserved_word_11<br>
                         / SQL_reserved_word_12 / SQL_reserved_word_13<br>
<br>
SQL_reserved_word_2 = SQL_reserved_word_20 / SQL_reserved_word_21<br>
                         / SQL_reserved_word_22 / SQL_reserved_word_23<br>
<br>
SQL_reserved_word_3 = SQL_reserved_word_30 / SQL_reserved_word_31<br>
                         / SQL_reserved_word_32<br>
<br>
SQL_reserved_word = SQL_reserved_word_0 / SQL_reserved_word_1<br>
                       / SQL_reserved_word_2 / SQL_reserved_word_3<br>
<br>
boolean_literal = &#39;True&#39;i / &#39;False&#39;i<br>
<br>
boolean_value_expression = boolean_literal / user_defined_function<br>
<br>
boolean_primary = predicate<br>
  / (&#39;(&#39; space* search_condition space* &#39;)&#39;)<br>
  / boolean_value_expression<br>
<br>
boolean_factor = (&#39;NOT&#39;i &amp;space)? space* boolean_primary<br>
<br>
boolean_term = boolean_factor<br>
  space+ (&#39;AND&#39;i / &#39;OR&#39;i)<br>
  space+ search_condition<br>
<br>
search_condition = boolean_term / boolean_factor<br>
<br>Select ra1,dec2,flux From mytable Where Contains(Point(&#39;j2000&#39;,ra,dec)<wbr>,Circle(&#39;J2000&#39;,+10 , -20,-1))= 1;<br>
Select ra1,dec2,flux From mytable Where 1=Contains(Point(&#39;j2000&#39;,ra,<wbr>dec),Circle(&#39;J2000&#39;,+10 , -20,-1));<br>
Select ra1,dec2,flux From mytable Where 1=Contains(pos,Circle(&#39;J2000&#39;,<wbr>+10 , -20,-1));<br>
Select ra1,dec2,flux From mytable Where Intersects(pos,Circle(&#39;J2000&#39;,<wbr>+10 , -20,-1))= 1;<br>
Select ra1,dec2,flux From mytable Where 1=INTERSECTs(pos,Circle(&#39;<wbr>J2000&#39;,+10 , -20,-1));<br>
Select ra1,dec2,flux From mytable Where Contains(Point(&#39;galactic&#39;,ra,<wbr>dec),Circle(&#39;galactic&#39;,+10 , -20,-1))= 1;<br>
Select ra1,dec2,flux From mytable Where Contains(Point(&#39;ICRS&#39;,ra,dec),<wbr>Circle(&#39;icrs&#39;,+10 , -20,-1))= 1;<br>
SELECT ra1 As rara, dec2, flux FROM mytable WHERE CONTAINS(POINT(&#39;J2000 Geocenter&#39;,ra,dec),CIRCLE(&#39;<wbr>J2000 Geocenter&#39;,+10 , -20,-1))= 1;<br>
SELECT ra1 As rara, dec2, flux FROM mytable WHERE CONTAINS(POINT(&#39;J2000 Geocenter&#39;,ra,dec),BOX(&#39;J2000&#39;<wbr>,+10 , -20,1,2))= 1;<br>
SELECT ra1 As rara, dec2, flux FROM mytable WHERE CONTAINS(POINT(&#39;J2000 Geocenter&#39;,ra,dec),POLYGON(&#39;<wbr>J2000&#39;,0,1,2,3,4,5,6,7,8,9,10,<wbr>11,12,13))= 1;<br>
SELECT * FROM mytable WHERE CONTAINS(POINT(&#39;J2000&#39;,<wbr>mytable.ra,dec),CIRCLE(&#39;J2000&#39;<wbr>,+10 , -20,-1)) = 1;<br>
SELECT * FROM my_table WHERE 1=CONTAINS(POINT(&#39;J2000&#39;,ra,<wbr>my_table.dec),CIRCLE(&#39;J2000&#39;,+<wbr>10 , -20,-1));<br>
SELECT * FROM my_table1 WHERE 1= CONTAINS(POINT(&#39;J2000&#39;,my_<wbr>table1.ra,dec),CIRCLE(&#39;J2000&#39;,<wbr>+10 , -20,-1));<br>
SELECT * FROM my_table1 WHERE 1= CONTAINS(POINT(&#39;J2000&#39;,my_<wbr>table1.ra,dec),CIRCLE(&#39;J2000&#39;,<wbr>+10 , -20,-1)) And (x&lt;1);<br>
SELECT * FROM my_table1 WHERE (x!=3) and 1= CONTAINS(POINT(&#39;J2000&#39;,my_<wbr>table1.ra,dec),CIRCLE(&#39;J2000&#39;,<wbr>+10 , -20,-1));<br>
SELECT * FROM my_table1 WHERE x!=3;<br>
SELECT * FROM my_table1;<br>
SELECT * FROM my_table1 where x&gt;2;<br>
SELECT * FROM my_table1 where x&gt;2 AND x&lt;4;<br>
SELECT * FROM my_table1 WHERE 1= CONTAINS(POINT(&#39;J2000&#39;,my_<wbr>table1.ra,dec),CIRCLE(&#39;J2000&#39;,<wbr>+10 , -20,-1)) And (x&lt;1 And x&gt;2 Or y &lt; 3 Or y &gt;5);<br>
SELECT * FROM my_table1 WHERE 1= CONTAINS(POINT(&#39;J2000&#39;,my_<wbr>table1.ra,dec),CIRCLE(&#39;J2000&#39;,<wbr>+10 , -20,-1)) And (x&lt;1 And x&gt;2);<br>
SELECT * FROM my_table1 where (x&gt;2 AND x&lt;4) Or (x&gt;6 and x&lt;10);<br>
SELECT * FROM my_table1 where (x Between 2 AND 4) Or (x&gt;6 and x&lt;10);<br>
SELECT * FROM my_table1 where x is null;<br>
SELECT * FROM my_table1 where x is not null;<br>
SELECT * FROM fp_psc WHERE CONTAINS(POINT(&#39;J2000&#39;,ccc.fp_<wbr>psc.ra, aaa.ccc.fp_pscdec),CIRCLE(&#39;<wbr>J2000&#39;,1,1,0.08))=1 and (ra between 0.95 and 1.05);<br>
SELECT * FROM my_table1 where x in (select y from my_table2);<br>
SELECT * FROM my_table1 where x in (10,20,30);<br>
SELECT * FROM my_table1 where x not in (10,20,30);<br>
SELECT All * FROM my_table1;<br>
SELECT Distinct * FROM my_table1;<br>
SELECT Top 14223 * FROM my_table1;<br>
SELECT * FROM my_table1 where 38*(x+1-3)&gt;2/4;<br>
SELECT ra+dec as ra_dec FROM my_table1;<br>
SELECT ra+dec FROM my_table1;<br>
SELECT my_tablel1.* FROM my_table1;<br>
SELECT sin(dec),cos(dec),tan(dec),<wbr>cot(dec),asin(dec),acos(dec),<wbr>atan(dec),atan2(ra,dec) FROM my_table1;<br>
SELECT abs(ra),ceiling(ra), degrees(ra),exp(ra),floor(ra),<wbr>log(ra),log10(ra),radians(ra),<wbr>sqrt(ra) FROM my_table1;<br>
SELECT mod(ra, dec),power( ra,dec ),pi(),rand(ra),rand(),round(<wbr>ra,10),round(ra),truncate(ra),<wbr>truncate(ra,10) FROM my_table1;<br>
SELECT modern() FROM my_table1;<br>
SELECT my_modern_function(ra,dec) FROM my_table1;<br>
SELECT my_modern_function(ra,dec), modern() FROM my_table1;<br>
SELECT my_modern_function(ra,dec) || modern() FROM my_table1;<br>
select &#39;a b c&#39;,&#39;a&#39;,&#39;a &#39;&#39;bv&#39; from b;<br>
select &quot;a b&quot;,&quot;a &quot;&quot; b&quot; from b;<br>
select &#39;a&#39; &#39;b&#39; from b;<br>
select &#39;a&#39; --This is a useful comment<br>
&#39;b&#39; from b;<br>
select (a), sum(a), max(all a), min(distinct a), count(a), avg ( a ) ,min(a) from a;<br>
select max(all a) from a;<br>
select count ( * ) from a;<br>
select count(*) from a;<br>
select count(a) from a;<br>
select count(all a) from a;<br>
select count(distinct a) from a;<br>
select sum(a) from a;<br>
select sum(all a) from a;<br>
select sum(DISTINCT a) from a;<br>
select sum(DISTINCTa) from a;<br>
select single from a;<br>
select a,b from a group by a;<br>
select a,b from a group by a having x&gt;2;<br>
SELECT * FROM my_table1 order by x;<br>
SELECT * FROM my_table1 order by x asc;<br>
SELECT * FROM my_table1 order by x desc;<br>
select b from a where x&lt;1 order by a;<br>
SELECT * FROM my_table1 where x like y;<br>
SELECT * FROM my_table1 where x like y || z;<br>
SELECT * FROM my_table1 where x not like my_sin(x);<br>
SELECT * FROM my_table1 where x like my_sin(x) || x;<br>
SELECT * FROM my_table1 where exists (select a from b);<br>
SELECT * FROM my_table WHERE (mjd&gt;=55550.0 and mjd&lt;=65650.5);<br>
SELECT my_table1.*,&#39;table&#39; from my_table1;<br>
SELECT myschema.mytable.* from myschema.mytable;<br>
SELECT * from mycatalog.myschema.mytable;<br>
SELECT * from myschema.mytable;<br>
SELECT mycatalog.myschema.mytable.* from mycatalog.myschema.mytable;<br>
SELECT * from myschema.mytable as mine;<br>
SELECT * from myschema.mytable mine;<br>
SELECT * from myschema.mytable, yourscheme.yourtable mine;<br>
SELECT * from TAP_UPLOAD.mytable;<br>
SELECT * from tapmod.mytable;<br>
SELECT TAP_UPLOAD.mytable.b from TAP_UPLOAD.mytable;<br>
SELECT TAP_UPLOAD.mytable.* from TAP_UPLOAD.mytable;<br>
SELECT TAP_UPLOAD.mytable.*, fp_psc.* from TAP_UPLOAD.mytable, fp_psc;<br>
SELECT * FROM my_table1 WHERE 1= CONTAINS(POINT(&#39;J2000&#39;,TAP_<wbr>UPLOAD.mytable.ra,TAP_UPLOAD.<wbr>mytable.dec),CIRCLE(&#39;J2000&#39;,+<wbr>10 , -20,-1)) ;<br>
SELECT * FROM my_table1 WHERE 1= CONTAINS(POINT(&#39;J2000&#39;,TAP_<wbr>UPLOAD.mytable.ra,TAP_UPLOAD.<wbr>mytable.dec),CIRCLE(&#39;J2000&#39;,<wbr>TAP_UPLOAD.mytable.ra,TAP_<wbr>UPLOAD.mytable.dec,-1)) ;<br>
SELECT alligator from a;<br>
SELECT tophat from a;<br>
SELECT max(alligator) from a;<br>
SELECT maximus from a;<br>
SELECT ast from a;<br>
Select fromage from fromming;<br>
Select fromage from fromming ast;<br>
select alligator from table1 join table2;<br>
select alligator from table1 natural join table2;<br>
select alligator from table1 natural left outer join table2;<br>
select alligator from table1 right outer join table2;<br>
select alligator from table1 right join table2;<br>
select alligator from table1 full outer join table2;<br>
select alligator from table1 natural inner join table2;<br>
select alligator from table1 inner join table2;<br>
select alligator from (table1 join table2);<br>
select alligator from table1 join (table2 join (table3 join table4));<br>
select alligator from table1 join table2 on a=b;<br>
select alligator from table1 t1 join table2 t2 on a=b join table3 t3 on c=d join table4 t4 on e=f join table5 t5 on g=h;<br>
select alligator from (table1 t1 join table2 t2 on a=b) join table3 t3 on c=d;<br>
select alligator from table1 join table2 using (a,b, c );<br>
select TOP 14223 caom.observation.*,caom.plane.<wbr>*,caom.artifact.*,caom.part.*,<wbr>caom.chunk.* FROM caom.observation join caom.plane on caom.observation.obsid = caom.plane.obsid join caom.artifact on caom.plane.planeid = caom.artifact.planeid join caom.part on caom.artifact.artifactid = caom.part.artifactid join caom.chunk on caom.part.partid = caom.chunk.partid;<br>
select TOP 14223 caom.observation.*,caom.plane.<wbr>*,caom.artifact.*,caom.part.*,<wbr>caom.chunk.* FROM (((caom.observation join caom.plane on caom.observation.obsid = caom.plane.obsid) join caom.artifact on caom.plane.planeid = caom.artifact.planeid) join caom.part on caom.artifact.artifactid = caom.part.artifactid) join caom.chunk on caom.part.partid = caom.chunk.partid;<br>
select alligator from (select a from b) as c;<br>
select fp_psc.* from fp_psc, TAP_UPLOAD.mytable where 1=contains(fp_psc.ra_dec, circle(&#39;j2000&#39;,TAP_UPLOAD.<wbr>mytable.ra,TAP_UPLOAD.mytable.<wbr>dec,0.001));<br>
select fp_psc.* from fp_psc, TAP_UPLOAD.mytable where 1=contains(fp_psc.ra_dec, circle(&#39;j2000&#39;,TAP_UPLOAD.<wbr>mytable.ra,TAP_UPLOAD.mytable.<wbr>dec,TAP_UPLOAD.mytable.r));<br>
select fp_psc.* from fp_psc, TAP_UPLOAD.mytable where 1=contains(fp_psc.ra_dec, circle(&#39;j2000&#39;,10,TAP_UPLOAD.<wbr>mytable.dec,TAP_UPLOAD.<wbr>mytable.r));<br>
select fp_psc.* from fp_psc, TAP_UPLOAD.mytable where 1=contains(fp_psc.ra_dec, circle(&#39;j2000&#39;,TAP_UPLOAD.<wbr>mytable.ra,10,TAP_UPLOAD.<wbr>mytable.r));<br>
select (fp_psc.x * TAP_UPLOAD.mytable.x) as dx from fp_psc, TAP_UPLOAD.mytable;<br>
select (TAP_UPLOAD.mytable.x - fp_psc.x) as dx from TAP_UPLOAD.mytable, fp_psc;<br>
select TAP_UPLOAD.mytable.x - TAP_UPLOAD.mytable.y as dx from TAP_UPLOAD.mytable, fp_psc;<br>
select (fp_psc.x - fp_psc.y) + (TAP_UPLOAD.mytable.x - fp_psc.x) as dxy from fp_psc;<br>
select fp_psc.x - TAP_UPLOAD.mytable.x from fp_psc, TAP_UPLOAD.mytable;<br>
select TAP_UPLOAD.mytable.x - fp_psc.x from fp_psc, TAP_UPLOAD.mytable;<br>
select * from herschel.observations where ST_Covers(poly,ST_Point(10,10)<wbr>)=&#39;t&#39; or ST_Distance(poly,ST_Point(10,<wbr>10)) &lt;= 0.0;<br>
select herschel.observations.*, ST_Distance(ST_Centroid(poly),<wbr>ST_Point(84.912154,-69.652608)<wbr>) as dist_to_centroid from herschel.observations where ST_Covers(poly,ST_Point(10,10)<wbr>)=&#39;t&#39; or ST_Distance(poly,ST_Point(10,<wbr>10)) &lt;= 0.0;<br>
select * from a where (1=0) AND (2=1) ORDER BY cntr ASC;<br>
select &#39;{a,b}&#39; from c;<br>
select ARRAYNOT from c;<br>
select * from twomass.full_images where (ST_DWithin(twomass.full_<wbr>images.poly,ST_Point(1, 1),0*111194.68229846345,&#39;f&#39;));<br>
SELECT schema_name as schemas FROM (select schema_name, min(table_index) as schema_index from TAP_SCHEMA.tables group by schema_name order by schema_index) as temp_schemas group by schemas order by schema_index;<br>
select schema_name from (select schema_name, min(table_index) as schema_index from TAP_SCHEMA.tables group by schema_name order by schema_index) temp_schemas;<br>
SELECT TAP_UPLOAD.pos.cntr as in_row_id FROM wise.wise_allwise_p3am_cdd, TAP_UPLOAD.pos WHERE (ST_Intersects(TAP_UPLOAD.pos.<wbr>poly,wise.wise_allwise_p3am_<wbr>cdd.poly)) ORDER BY in_row_id ASC, dist_to_bounds ASC;<br>
select CASEFULL from b;<br>
<br>
<br>
POINT(&#39;foo&#39;,10 20);<br>
POINT(&#39;foo&#39;,1.0, 20);<br>
POINT(&#39;foo&#39;,10 ,-2.0);<br>
SELECTTOP 100 * FROM my_table1;<br>
SELECT TOP100 * FROM my_table1;<br>
SELECT TOP 100* FROM my_table1;<br>
SELECT TOP hundred * FROM my_table1;<br>
SELECT DISTINCT sin FROM my_table1;<br>
SELECT TOP 100 FROM my_table1;<br>
SELECT * FROM my_table1 where x in(10,20,30);<br>
SELECT * FROM my_table1 where x not in(10,20,30);<br>
SELECT FROM my_table1 WHERE CONTAINS(POINT(&#39;J2000&#39;,10 , 20),CIRCLE(&#39;J2000&#39;,10 , 20,1));<br>
SELECT * FROM WHERE CONTAINS(POINT(&#39;J2000&#39;,10 , 20),CIRCLE(&#39;J2000&#39;,10 , 20,1));<br>
1= CONTAINS(POINT(&#39;J2000&#39;,my_<wbr>table1.ra,dec),CIRCLE(&#39;J2000&#39;,<wbr>+10 , -20,-1)) And x&lt;1 And x&gt;2 Or y &lt; 3 Or y &gt;5SELECT *,ra FROM my_table1;<br>
SELECT my_tablel1.* as ra_dec FROM my_table1;<br>
select sum(a,b) from a;<br>
select sum from a;<br>
select sum( from a;<br>
select abs(a,b) from a;<br>
select sin from a;<br>
select sin() from a;<br>
select sin( from a;<br>
select atan2 from a;<br>
select atan2() from a;<br>
select atan2(a) from a;<br>
select atan2(a,) from a;<br>
select atan2(a,b from a;<br>
select round from a;<br>
select round() from a;<br>
select round(a,) from a;<br>
select round(a,b from a;<br>
select round(a,10 from a;<br>
select count(* from a;<br>
select b from a where x&lt;1 groupby a;<br>
select b from a where x&lt;1 group bya;<br>
select b from a where x&lt;1 orderby a;<br>
select b from a where x&lt;1 order bya;<br>
select b from a where x&lt;1 havinga;<br>
select a asb from a group by a;<br>
Select fromage ast from fromming;<br>
SELECT * FROM my_table1 where (x notBetween 2 AND 4);<br>
SELECT * FROM my_table1 where x notin (10,20,30);<br>
SELECT * FROM mytable WHERECONTAINS(POINT(&#39;J2000&#39;,<wbr>mytable.ra,dec),CIRCLE(&#39;J2000&#39;<wbr>,+10 , -20,-1)) = 1;<br>
SELECT * FROM mytable as my WHERECONTAINS(POINT(&#39;J2000&#39;,<wbr>mytable.ra,dec),CIRCLE(&#39;J2000&#39;<wbr>,+10 , -20,-1)) = 1;<br>
SELECT * from TAP_UPLOAD.wrong_table;<br>
SELECT TAP_UPLOAD.* from TAP_UPLOAD.mytable;<br>
SELECT TAP_UPLOAD.wrong_table from TAP_UPLOAD.mytable;<br>
select CASE foo WHENever THEN &#39;c&#39; END from b;<br>
select alligator from (table1);<br>
<br>POINT(&#39;foo&#39;,10 20);<br>
POINT(&#39;foo&#39;,1.0, 20);<br>
POINT(&#39;foo&#39;,10 ,-2.0);<br>
SELECTTOP 100 * FROM my_table1;<br>
SELECT TOP100 * FROM my_table1;<br>
SELECT TOP 100* FROM my_table1;<br>
SELECT TOP hundred * FROM my_table1;<br>
SELECT DISTINCT sin FROM my_table1;<br>
SELECT TOP 100 FROM my_table1;<br>
SELECT * FROM my_table1 where x in(10,20,30);<br>
SELECT * FROM my_table1 where x not in(10,20,30);<br>
SELECT FROM my_table1 WHERE CONTAINS(POINT(&#39;J2000&#39;,10 , 20),CIRCLE(&#39;J2000&#39;,10 , 20,1));<br>
SELECT * FROM WHERE CONTAINS(POINT(&#39;J2000&#39;,10 , 20),CIRCLE(&#39;J2000&#39;,10 , 20,1));<br>
1= CONTAINS(POINT(&#39;J2000&#39;,my_<wbr>table1.ra,dec),CIRCLE(&#39;J2000&#39;,<wbr>+10 , -20,-1)) And x&lt;1 And x&gt;2 Or y &lt; 3 Or y &gt;5SELECT *,ra FROM my_table1;<br>
SELECT my_tablel1.* as ra_dec FROM my_table1;<br>
select sum(a,b) from a;<br>
select sum from a;<br>
select sum( from a;<br>
select abs(a,b) from a;<br>
select sin from a;<br>
select sin() from a;<br>
select sin( from a;<br>
select atan2 from a;<br>
select atan2() from a;<br>
select atan2(a) from a;<br>
select atan2(a,) from a;<br>
select atan2(a,b from a;<br>
select round from a;<br>
select round() from a;<br>
select round(a,) from a;<br>
select round(a,b from a;<br>
select round(a,10 from a;<br>
select count(* from a;<br>
select b from a where x&lt;1 groupby a;<br>
select b from a where x&lt;1 group bya;<br>
select b from a where x&lt;1 orderby a;<br>
select b from a where x&lt;1 order bya;<br>
select b from a where x&lt;1 havinga;<br>
select a asb from a group by a;<br>
Select fromage ast from fromming;<br>
SELECT * FROM my_table1 where (x notBetween 2 AND 4);<br>
SELECT * FROM my_table1 where x notin (10,20,30);<br>
SELECT * FROM mytable WHERECONTAINS(POINT(&#39;J2000&#39;,<wbr>mytable.ra,dec),CIRCLE(&#39;J2000&#39;<wbr>,+10 , -20,-1)) = 1;<br>
SELECT * FROM mytable as my WHERECONTAINS(POINT(&#39;J2000&#39;,<wbr>mytable.ra,dec),CIRCLE(&#39;J2000&#39;<wbr>,+10 , -20,-1)) = 1;<br>
SELECT * from TAP_UPLOAD.wrong_table;<br>
SELECT TAP_UPLOAD.* from TAP_UPLOAD.mytable;<br>
SELECT TAP_UPLOAD.wrong_table from TAP_UPLOAD.mytable;<br>
select CASE foo WHENever THEN &#39;c&#39; END from b;<br>
select alligator from (table1);<br>
<br></blockquote></div><br></div></div></div>