Fixed SQL syntax bug and possible exception.
Completed TickerAnalyzerCommand.