SQL SearchThe SQL Search tool, also known as the Query tool, gives you more flexibility than any other tool on SkyServer. You can use it to search through the SDSS database to return all objects that meet any criteria you choose, and the search will return only the information you tell it to return. To access the SQL search tool, select Search from the Tools main page, then select SQL from the menu on the left edge of the screen. To perform a SQL search, you must write a command, or "query," in Structured Query Language (SQL), a commercial programming language used to access databases. SQL is a fairly difficult language to learn, but any effort you put in to learning SQL will be returned a thousand times over when you use the SQL Search tool. For example, the following query returns the Object IDs, positions, redshifts, and plate and fiber numbers of the most distant quasars in the SDSS database (z > 4):
Try copying and pasting this query into the window of the SQL search tool (overwriting the default query). The search will return 64 quasars where z > 4. Not all of these are actually quasars; some of them are mistakes by the SDSS processing pipelines. To verify that they truly are distant quasars, go back and look at them with the Object Explorer (look them up by Object ID or ra/dec). If you tried to find these 64 quasars by looking through 80 million objects with the Navigation tool, you could be busy for weeks. But with a single well-written query like the one above, you could find all 64 in seconds! SkyServer includes a "How To" tutorial to help you write your own SQL queries. Once you finish it, you'll be well on your way to searching through the SDSS database. |