Page History
...
One special service is the ADQL query service, shown on Fig 4.. This contains a single box that can be used to provide custom queries using the Astronomical Data Query Language (ADQL), which in essence is a dialect of SQL. Some more information on, and examples of ADQL can be found further below.
Info | ||||||
---|---|---|---|---|---|---|
| ||||||
Fig. 4 ADQL query form. Click for a bigger image. |
...
In several places, ADQL was mentioned as a way to construct queries to the data and catalogues. ADQL is a query language resembling SQL, so the main concepts are familiar to those acquianted with SQL. The full reference documentation (i.e. stnadard definition) contains all possible commands. Here we show some simple examples of table queries. You can perform queries using ADQL on the ADQL form (see Fig. 4), or for instance in TOPCAT (see Fig. 6). Also note that TOPCAT has some built in examples implemented. Even though the ADQL commands are case insensitive, it is
In the following examples, we will follow the common practice to write them SQL commands in upper case so that table data and variable values can easily been distinguished from commands, and names of objects (tables, columns, etc) in lower case letters. The SQL commands are however case insensitive so you are totally free to for instance write select in stead of SELECT.
Basic examples
The first example is simply selected all items from the lcbsw.main table:
...