Sloan Digital Sky Survey
SkyServer DR14  
Not logged in Login Help
 

DR14 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
Get a Random Subset

Back to General Tasks index

Get a random subset (open SQL Search in new window)


  1. Go to the SQL Search page (link opens in new window). From the astronomers' main page, look under Search Tools. From the public main page, look under SkyServer Tools, then Search.

  2. In the large textbox, type the following SQL query:

    SELECT u, g, r, i, z
    FROM Galaxy
    WHERE htmid*37 & 0x000000000000FFFF < (650 * 1)
  3. The query will return a 1% subset of the data. To return a different percentage subset of the data, change the final 1 to a different number (for example, for a random 0.5% subset of the data, change it to 0.5).

  4. The query will return the magnitudes of a 1% subset of the data. You can also return other data, such as positions and object IDs.

The form below will let you run this query. Click Submit to run the query. Click Reset to clear the textbox. The full query will take a while to run, but it should start showing results immediately.

Format HTML XML CSV

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

If you're interested, the query finds the random points by using SkyServer's Hierarchical Triangular Mesh, multiplied by a prime number.


 Go to the previous page

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