Query editor
WITH added_pools AS (SELECT_token,evt_block_time,DATE_TRUNC('day', evt_block_time) AS add_date -- Change to 'week' or 'month' for different granularityFROM grassroots_economics_celo.pooluniquesymbolindex_evt_addressadded),removed_pools AS (SELECT DISTINCT _tokenFROM grassroots_economics_celo.pooluniquesymbolindex_evt_addressremoved),active_pools_by_date AS (SELECTa.add_date,a._tokenFROM added_pools aLEFT JOIN removed_pools r ON a._token = r._tokenWHERE r._token IS NULL -- Only count tokens that haven't been removed)SELECTadd_date AS date,COUNT(DISTINCT _token) AS pools_added,SUM(COUNT(DISTINCT _token)) OVER (ORDER BY add_date) AS cumulative_poolsFROM active_pools_by_dateGROUP BY add_dateORDER BY add_date