Sloan Digital Sky Survey
SkyServer DR16 plus 
Not logged in Login Help
 

DR16 Help
 Start Here
 FAQ
 Cooking with Sloan
     - General
     - Solar System
     - Stars
     - Galaxies
     - QSOs/Cosmology
     - Teaching/Labs
 Contact Help Desk
 
 Searching SDSS
 SQL Tutorial
 SQL in SkyServer
 Sample SQL Queries
 Query Limits
 Searching Advice
 
 About the Database
 Table Descriptions
 Schema Browser
 Glossary
 Algorithms
 API/Tools
Segue Spectra

Back to Stars index

Search with SQL (open in new window)


  1. Go to the SQL Search tool (link opens in new window). To get there from the astronomers' main page, look under Search Tools. To get there from the public main page, look under SkyServer Tools, then Search. Or, you can practice searching using the query in the query box at the bottom of this page.

  2. In the main window, type the following query (note that lines preceded by -- are comments):

    SELECT s.bestobjid, s.ra, s.dec,   -- select ID, ra, dec of star,
       s.plate, s.mjd, s.fiberID   -- plate, MJD, fiber ID of spec observation
    FROM plateX p
    JOIN specObjAll s ON s.plateID = p.plateID   -- from plate and spectrum tables
    WHERE p.programname like '%segue%'   -- part of SEGUE survey
       AND s.bestObjID > 0   -- object also has photometric data
       AND s.class = 'STAR'    -- object is a star

    The query returns the object ID, RA, and dec of each star with a SEGUE spectrum. It also returns the plate number on which the spectrum was observed, the MJD when it was observed, and the fiber that the spectrum was observed with. The last three pieces of information will help you to retrieve the spectrum FITS file.

  3. To learn more about each observation of the star, you will need to go to another tool. Save the object ID and/or RA and dec of each observation; you will need it to find the observations later. One way to save the object IDs is to request the query results as CSV, then save the resulting CSV file to your machine.

Use the query box below to practice running the query shown above. You can modify the query to return other data if you want. Click Submit to run the query or Reset to reset the query box.

Format HTML XML CSV

Enter your SQL query in the text box. The query is limited to 10 minutes and 100,000 rows.


Next: View the star and spectrum

 Go to the previous page Go to the next page

Back to Cooking with Sloan main page
Back to Help main page
Contact Help Desk