Sloan Digital Sky Survey
SkyServer DR16  
Not logged in Login Help

SQL Tutorial
 Back to Help
 1. Introduction
 2. A Simple Query
 3. Common Searches
 4. More Samples
 5. Multiple Tables
 6. Aggregate Fcns.
 7. Group By
 8. Order By
 10. Functions
 11. Conclusion
SQL Tutorial

Practice Using Joins

Write queries to answer the astronomy questions in Practice 5 and 6. Use the Schema Browser when you need it.

Practice 5. How can you look up image data, plates and spectra of moderately bright nearby galaxies?

Write a query to find 100 galaxies for which we have spectra that have g magnitude between 17 and 17.4 and redshift less than 0.05. For each galaxy, retrieve the object ID, the five magnitudes (u,g,r,i,z), the redshift, the plate/MJD number, and the fiber number.

Show Sample Solution


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