分析函数和where子句

时间:2015-02-26 20:41:06

标签: sql oracle oracle11g

我有简单的代码,如:

Select distinct a.Symbol,b.Symbol, corr(a.logp,b.logp) 
over (partition by a.symbol,b.symbol)  Correlation
    From logprofittest a, logprofittest b
    where a.Symbol<>b.symbol
    And  To_date(a.Tdate,'YYYYMMDD') between  DATE'2013-12-01' AND DATE'2013-12-31'
    and  To_date(b.Tdate,'YYYYMMDD') between  DATE'2013-12-01' AND DATE'2013-12-31'
    and  To_date(a.Tdate,'YYYYMMDD')=To_date(b.Tdate,'YYYYMMDD')
    and correlation>0.5
    Order by correlation desc;

但是,错误说correlation>0.5错了,请问如何解决?

0 个答案:

没有答案