We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Can anyone tell why windows function is not working in below query?
select t.submission_date,
max(t.cnt) over (partition by t.submission_date)
t.hacker_id,t.name
from (select submission_date,count(*) as cnt,h.hacker_id,name
from submissions s join hackers h on s.hacker_id = h.hacker_id
group by submission_date,h.hacker_id,name
having cnt > 0
order by submission_date) t
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
15 Days of Learning SQL
You are viewing a single comment's thread. Return to all comments →
Can anyone tell why windows function is not working in below query?
select t.submission_date, max(t.cnt) over (partition by t.submission_date) t.hacker_id,t.name from (select submission_date,count(*) as cnt,h.hacker_id,name from submissions s join hackers h on s.hacker_id = h.hacker_id group by submission_date,h.hacker_id,name having cnt > 0 order by submission_date) t