hist_qry2.sql  SQL

Appendix A: SQL Scripts for Sample Queries

Output

The following output displays the first 25 rows returned by this query:

TRADING_SYMBOL  TRADE_DATE   H_PRC    L_PRC    C_PRC    O_PRC       VOL
AAA             2005-03-03  793.52   728      740.88   740.88   27.46428571
AAA             2005-03-04  749.84   651      726.04   740.88   29.10714286
AAA             2005-03-07  764.4    672      733.32   726.04   29.10714286
AAA             2005-03-08  786.24   637      726.04   733.32   26.17857143
AAA             2005-03-09  707      637      711.48   726.04   26.67857143
AAA             2005-03-10  700      624.96    697.2   711.48   24
AAA             2005-03-11  749      618.24    711.2    697.2   23.75
AAA             2005-03-14  742.56   658      732.48    711.2   25.85714286
AAA             2005-03-15  757.12   686       725.2   732.48   26.85714286
AAA             2005-03-16  728      644      710.64    725.2   28.46428571
AAA             2005-03-17  721      700      724.92   710.64   30.14285714
AAA             2005-03-18  735      644      717.64   724.92   28
AAA             2005-03-21  707      665      710.64   717.64   28
AAA             2005-03-22  763      637      710.64   710.64   27.71428571
AAA             2005-03-23  763      658.56   696.36   710.64   24.92857143
AAA             2005-03-24  692.16   638.4    682.36   696.36   25.14285714
AAA             2005-03-25  725.76   651.84   689.36   682.36   26.89285714
AAA             2005-03-28  728      624.96   703.08   689.36   26.89285714
AAA             2005-03-29  728      686      710.08   703.08   25
AAA             2005-03-30  700      672      710.08   710.08   23.25
AAA             2005-03-31  735      672      717.08   710.08   21.35714286
AAA             2005-04-01  735      651      724.36   717.08   21.75
AAA             2005-04-04  735      665      724.36   724.36   19.78571429
AAA             2005-04-05  756      644      724.36   724.36   19.35714286
AAA             2005-04-06  778.96   679      738.92   724.36   19.35714286
...




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

View this book as PDF