1

I have a table with few columns as shown below. I would like to get a count of all the records per week level but I am unable to count it. I could also use group by but I do not want to do that because it gives me too many records. I use denodo and 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

Code:

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

Basically, I am looking for an equivalent query to partition by which will run fine.

Error:

finished with error: Error executing view: Function count is not executable
KSp
  • 1,199
  • 1
  • 11
  • 29
  • 1
    You are missing comma after `yy.year` – Popeye Jan 29 '21 at 08:33
  • Thanks ill fix it. Still the issue with count remains the same. – KSp Jan 29 '21 at 08:35
  • Can you write what output do you want to get? I don't understand the > group by gives me too many records Does your **yy** table contain the years months that you want to see in the result? – Petr Jan 29 '21 at 09:05

0 Answers0