The Exoplanet Encyclopaedia — Query language

In The Exoplanet Encyclopaedia it is possible to filter exoplanets on the catalog and diagrams pages using simple boolean expressions query language which mimics syntax of WHERE clause in SQL language. One can also download query result from the catalog page in machine-readable format by clicking one of the Download links on the top right after applying desired filter.

The language consists of arbitrary number of expressions combined together using AND or OR clauses. Expression usually has the following structure (square brackets mean optional clauses):

planet_parameter[:unit] operator value [AND | OR [NOT] expression] [, …]

where planet_parameter[:unit] is the name of any exoplanet property present in the database, with optional unit specification in few cases, namely:
In the absence of unit specification system does no unit conversion and compares the data with desired value in the default database units.

Operator can be any comparison operator from SQL-like languages:

Slightly different syntax for expression is employed for testing substring inclusion in planet parameters of a string type:

"substring" IN planet_parameter_string

Another alternative tests for presence of desired substring(s) as a separate word(s) in planet_parameter_string:

{"substring1" [, "substring2" [, ...]]} IN planet_parameter_string

which is often equivalent of the query "substring1" IN planet_parameter_string AND "substring2" IN planet_parameter_string, though not exactly.

Please also keep in mind that you have flexibility to change places of planet_parameter and value in expressions and the overall language is case-insensitive.

Query examples
  • radius:rearth < 10 AND discovered >= 2010
  • mass:mjup > 2.0 AND period:day < 10
  • period:day <= 100 AND (mass:mjup < 2 OR axis:au < 5.0) AND mass:mjup != 10.5
  • "corot" IN name AND NOT "b" IN name
  • {"oxygen", "carbon"} IN remarks
  • "H2O" IS_IN molecules AND "transit" IN detection
  • NOT mass:mjup > 1
  • 10 < radius:rearth
  • 1 = 1
We believe that this simple query language fulfills most of quick-look needs of a user. If this is not the case, please download the complete copy of the database in a suitable format (VOTable, CSV, DAT) and use any available application (one good example is TOPCAT) to slice the data as you like. For more complex queries and advanced users we provide TAP (Table Access Protocol) service (see details at Virtual Observatory page).