Query editor
WITH cumulative_followers AS (SELECT*,SUM(new_follows - unfollows) OVER (ORDER BY date) AS cumulative_new_followersFROM dune.araistotle_team.dataset_x_account_overview_analytics),with_weekly_delta AS (SELECT*,cumulative_new_followers- LAG(cumulative_new_followers, 7) OVER (ORDER BY date) AS weekly_delta_followersFROM cumulative_followers)SELECT *FROM with_weekly_deltaLIMIT 1000;