Practice 2. Which of the objects you found in
Practice 1 are galaxies?
Open the
Schema Browser .
Click on views and select SpecObj. You will see a list of all the columns in the SpecObj
table, along with short descriptions of what they mean and
if applicable, what values the column may have.
For instance,
if you scroll down to the "class" column, its description says
that it may have one of the following values: 'STAR',
'GALAXY', or 'QSO'.
Modify your query so that it returns the ra, dec, and best
object ID for galaxies (and only galaxies) whose ra is
between 140.25 and 140.75 and whose dec is between 20.25 and 20.75.
Show Sample Solution
A query that accomplishes this task is:
SELECT
ra, dec
FROM
specObj
WHERE
ra BETWEEN 140.25 and 140.75
AND dec BETWEEN 20.25 and 20.75
AND class='GALAXY'
In SDSS Data Release 13, this query returns 41 results, meaning that 41 of the 89
objects in this part of the sky are galaxies.
Hide Sample Solution
|