OTHER ACCESS TOOLS AND SAMPLE QUERIES
You can submit queries with the SDSS Query Analyzer (sdssQA) Java application,
which can be downloaded here, and contains 25 sample queries.
You can run queries on this skyserver directly using Robert Lupton's emacs interface at:
http://astro.princeton.edu/~rhl/skyserver/skyserver.el (download)
. There are also sample queries on this site in the
examples.sql file.
You can also run command-line queries on the DR1 databases using Tamas Budavari's Python tool sqlcl at
the sqlcl download page.
Note that both the emacs interface and sqlcl submit queries via the skyServer, so they are subject to the same execution time
and row limits as this page. The sdssQA is the only interface that goes directly to the databases (using ODBC), so it is not
subject to the same restrictions as the SkyServer.
You can link to the SQL search page directly via a URL:
http://skyserver.pha.jhu.edu/dr1/en/tools/search/x_sql.asp,
which takes two parameters:
cmd | The body of the SQL command, with
URL-encoding |
format | HTML: as a normal web output in tabular form
XML: as an xml document CSV: as a comma separated ASCII values with a header line |
EXAMPLE:
If you wanted to run the following query :
SELECT TOP 20 * FROM Galaxy WHERE r<17, and get back the result as a csv file,
then you would run the following command line process:
wget -q -O "out.csv" "http://skyserver.pha.jhu.edu/dr1/en/tools/search/x_sql.asp?format=csv &cmd=SELECT%20TOP%2010%20*%20FROM%20Galaxy%20WHERE%20r%3C17"
|