0
Table A
----------------
Date index
------------------
2016-10-20 2.3
2016-10-21 2.8
------- ---
------- ---
Table B:
--------
Code Life_completed
A 5
b 6
实际查询:SQL:子查询问题
select *,(select sum(index)
from table1
where date between current_date +3 AND current_date
) as Index
from table b
预计查询: 我们能用current_date +Life_completed
我们使用Vertica的数据库取代CURRENT_DATE +3 ..
请在这里帮助..
请给数据库标记 – NzGuy
您是否尝试过替换它?它应该工作(当然你必须切换在两者之间使用的值) – dnoeth
@dnoeth:是的,我试过..获取一些错误.. select/gby/oby中的相关子查询列不受支持 –