|Cooking with Sloan|
|- Solar System|
|Search Form Guide|
|SQL in SkyServer|
|Sample SQL Queries|
|Contact Help Desk|
Get objects with clean photometry (open in new window)
By using several flags together, you can limit your searches to return only objects that have clean photometry, thereby ensuring that you have a good sample. The flags you use differ depending on whether you are looking at stars or extended objects.
The queries below run slowly. These are test versions that use TOP 10 to return only the first 10 matching objects. To return all matching objects, remove the top 10 and use the CasJobs batch query system (link opens in a new window), which lets you run queries that take up to 8 hours. Also, note that lines that start with "--" are comments that are not executed as SQL statements.
For stars, use the following query to return IDs, positions, colors, and flags:
For extended objects, use the following query to return IDs, positions, colors, and flags:
The form below will let you practice searching for flags with SQL, using the example queries on this page. Press Query 1 or Query 2 to load the queries, and Submit to run the queries.