terr

Spotfire : Syntax issue or Window functions not allowed?

流过昼夜 提交于 2020-01-15 09:28:30
问题 I am using Data functions in Spotfire. I have the sqldf package installed. Here is the query: #Package to run sqls library(sqldf) #Input data frame op1 <- sqldf("SELECT Prod_parnt,prodct_grop,year,month,week, count(distinct id) as prd_cnt, Sum(Count(distinct id)) over (partition by modlty,prodct_grop order by year,month,week rows between 12 preceding and current row) as cumu_prd_cnt, avg(rate) as sal_rate FROM ip1 group by Prod_parnt,prodct_grop,year,month,week") The error I am facing: "TIBCO