分组后结果:
年份 年销售量
2007 2000
2008 3000
2009 5000
2010 3210
我想得到这样的结果:再显示一列
年份 年销售量 历年销售总量
2007 2000 2000
2008 3000 5000
2009 5000 10000
2010 3210 13210
... ... ....
用oracle语句怎么查询??
在线等待。。。。。。。。。。。。。。。。
select y,s, sum(s) over(order by s) from test3
select a.year,a.sale,( select sum(b.sale)
from a as b
where a.year >= b.year )
from a
with temp as(
select '2007' yyyy,2000 quantity from dual
union all
select '2008' yyyy,3000 quantity from dual
union all
select '2009' yyyy,5000 quantity from dual
union all
select '2010' yyyy,3210 quantity from dual
)
select yyyy,sum(quantity) over(order by quantity) from temp order by yyyy
看错了,少了一项
with temp as(
查了一天的blob,还是没理解到,我想在VC下存取二进制的文件,使用的是oo4o,照着帮助文档上面的写了写入数据库的代码,还是没写对,错误提示是this operation is not permitted on a empty LOB,这是什么意思啊?照 ......