This message was deleted.
# troubleshooting
s
This message was deleted.
j
Hi Tom, Without Window Functions (which are coming out soon, might be in Druid 25/26 already in experimental form), the only way I know how to do this is a self-join ... but it requires that you have unique key values to properly generate a clean contiguous list of consecutive numbers. Here's an example using the wikipedia demo data set:
Copy code
select a.channel, 
       a.__time,
       count(b.__time) as ranknum
  from wikipedia a 
  join wikipedia b on a.channel = b.channel
 where b.__time <= a.__time
 group by 1, 2
 order by 1, 2
-- John
👍 1
t
count(b.__time), a good one. Thanks a lot @John Kowtko