Query editor
withethx_trade as (SELECTblock_date,blockchain,CONCAT(token_sold_symbol, '>', token_bought_symbol) trade,CONCAT(project, '-', version) project_name,token_bought_symbol as token_out,token_sold_symbol as token_in,token_bought_amount token_taken,token_sold_amount token_given,amount_usd trade_amount_usd,project_contract_address,tx_hashFROMdex.tradeswheretoken_bought_symbol = 'SD'OR token_sold_symbol = 'SD'),results as (SELECTblock_date time,blockchain,project_name dex,SUM(trade_amount_usd) volume,COUNT(DISTINCT tx_hash) swap_countFROMethx_tradeGROUP BY1,2,3),daily_volume as (SELECTtime,sum(volume) OVER (PARTITION BYtime) as daily_volume,ROW_NUMBER() OVER (PARTITION BYtime) as rnFROMresults),volume_over_time as (SELECTtime,daily_volume,((daily_volume - LAG(daily_volume) OVER (order bytime)) / LAG(daily_volume) OVER (order by