Query editor
WITH added_tokens 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.tokenuniquesymbolindex_evt_addressadded),removed_tokens AS (SELECT DISTINCT _tokenFROM grassroots_economics_celo.tokenuniquesymbolindex_evt_addressremoved),active_tokens_by_date AS (SELECTa.add_date,a._tokenFROM added_tokens aLEFT JOIN removed_tokens 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 tokens_added,SUM(COUNT(DISTINCT _token)) OVER (ORDER BY add_date) AS cumulative_tokensFROM active_tokens_by_dateGROUP BY add_dateORDER BY add_date