Historical market data queries  Output

Appendix A: SQL Scripts for Sample Queries

hist_qry1.sql

Get the closing price of a set of 10 stocks for a 10-year period and group into weekly, monthly, and yearly aggregates. For each aggregate period determine the low, high, and average closing price value. Output is sorted by TRADING_SYMBOL and trade date.





Copyright © 2005. Sybase Inc. All rights reserved. Output

View this book as PDF