我有个问题
library(DBI)
res = dbSendQuery(con,
"select
X, Y, z from table where date between date'2018-07-01' - interval '31' day and date'2018-07-01 - interval '1' day")
res.df = dbFetch(res, -1)
我想在一个日期循环中运行它,以便它填充2018-07-01和2018-07-30之间所有日期的数据
有人能帮我查一下密码吗
2条答案
按热度按时间sg24os4d1#
如果你真的想要一个循环:
cbjzeqam2#
对于2018-07-01和2018-07-30之间的所有日期,不需要循环来填充数据。
您只需按日期筛选: