2 delete from active_servers_mv;
4 insert into active_servers_mv
5 select row_number() over(order by count(1) desc) sort_order, s.server_id, s.name, count(1) games
6 from servers s join games g on s.server_id = g.server_id
7 where g.create_dt >= now() at time zone 'UTC' - interval '1 week'