6. SELECT for real

ADQL defines only one statement, the SELECT statement, which lets you write down expressions of relational algebra. Roughly, it looks like this:

SELECT [TOP setLimit] selectList FROM fromClause [WHERE conditions] [GROUP BY columns] [ORDER BY columns]

In reality, there are yet a few more things you can write, but what’s shown covers most things you’ll want to do. The real magic is in selectList, fromClause (in particular), and conditions.

TOP

setLimit: an integer giving how many rows you want returned.

SELECT TOP 5 * FROM rave.main
SELECT TOP 10 * FROM rave.main


Markus Demleitner, Hendrik Heinl

Copyright Notice