0

我有一个包含几列的表,如下所示。我想计算每周级别的所有记录,但我无法计算。我也可以使用 group by,但我不想这样做,因为它给了我太多记录。我使用denodo和oracle 18g。

s_id          sub_id    week    year    st_id
24hifew       njfhwf    50     2020    ew1eer
939hjefbw   newfkhwfe   34     2019    e3eef3
hewfhwe23   67832ghef   44     2018    ewfwf1

代码:

select
xx.s_id,
xx.sub_id,
xx.st_id,
yy.week,
yy.year,
count(*) OVER ( PARTITION BY yy.year, yy.week,xx.s_id,xx.sub_id xx.st_id) as week_l

from xx as xx left join yy as yy

基本上,我正在寻找一个等效的查询来分区,它将运行良好。

错误:

finished with error: Error executing view: Function count is not executable
4

0 回答 0