楼主: boscosoa
1452 1

在 oracle sql developer里用一组数据算比值 [推广有奖]

  • 4关注
  • 0粉丝

VIP1

已卖:17份资源

硕士生

39%

还不是VIP/贵宾

-

威望
0
论坛币
793 个
通用积分
2.7474
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
1990 点
帖子
106
精华
0
在线时间
211 小时
注册时间
2011-1-15
最后登录
2020-7-9

楼主
boscosoa 发表于 2013-11-15 16:18:41 |AI写论文
3论坛币
现在有两列数据,A 和 B, 我要根据A和B算出它们的比值C。

C的公式是  C(i) = (A(i-1)+A(i-2)+A(i-3))/B(i),我还要创建C的视图。

高手,请帮我解答一下如何写这个的SQL命令。谢谢!

关键词:developer Develop Oracle EVE CLE developer oracle

沙发
caowenlei 发表于 2015-8-26 06:28:04
Please define the meaning of "i", otherwise nobody can answer your question.

if i is row number, then what about the first two row   i-3 will be negative.

thanks

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-27 03:23