Tutorials
Ajuda do DR5
 Arquivos: Introdução
 Descrições das Tabelas
 Navegador Schema
 Glossário
 Algoritmos
 Introdução a SQL
 Guia Formulário Busca
 Limites de Busca
 Como Fazer
     - Busca
     - Gráfico
 Perguntas Frequentes
 API
 sdssQA
 Download
 Sites do SkyServer
 Página de Tráfego
 Navegadores Web
 Contatar Help Desk (em inglês)
Busca
 Back
 1. Introdução
 2. Um Query Simples
 Exercício
 3. Usualmente Buscada
 4. Mais Exemplos
 Exercício
 5. Multiple Tables
 Practice
 6. Aggregate Fcns.
 7. Group By
 8. Order By
 Practice
 9. Views
 10. Functions
 Practice
 11. Conclusion

Practice Using Functions

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

Practice 10. In the field 756-6-525, what percentage of all objects detected by the SDSS are too close to the edge of their fields to be trusted?

Hint: Use two searches, one with a flag and one without. Search run=756, camcol=6, field=525.

Practice 11. Choose a galaxy cluster from SkyServer's Famous Places tool. Write a query to select galaxies in the cluster, and only galaxies in the cluster.

Hint: After you pick a cluster, use the Navigation Tool to examine the cluster. Guess which galaxies belong to the cluster - you should be able to tell just by looking. Click on 5-10 cluster galaxies and save them in your online notebook. Open the notebook, and look for features that the cluster galaxies have in common. Guess the center position and radius of the galaxies. Then, write a query that uses what you have learned to search for cluster galaxies.

Answers

An Afterthought: Procedures and Constants

In addition to tables, views, and functions, the Schema Browser contains entries for procedures and constants. Procedures, like functions, are mini-programs that the database can execute. Unlike functions, they do not output a single value; rather, they manipulate the inputs passed in to them. Procedures are called with the syntax

dbo.spProcedurename(inputs)

Nearly all of the procedures in SkyServer are used by the web server or tools - you will hardly ever use them in your queries. If you ever need them, the Schema Browser will tell you what they do and how to use them.

Constants are, well, constant. They can be displayed and searched just like tables can. See the Schema Browser for a complete description of SkyServer's constants.

You're done! Click Next for the conclusion.


Formato HTML XML CSV

Digite o seu query SQL na caixa de texto. A busca é limitada em 90 segundos e 1000 linhas.