Query editor
WITH info AS (SELECTblockchain, version, block_time, token_bought_symbol, token_sold_symbol,token_pair, token_bought_amount, token_sold_amount, amount_usd,token_bought_address, token_sold_address, taker, maker,project_contract_address, tx_hashFROMdex.tradesWHEREproject = 'uniswap'),tokens AS (SELECTdate_trunc('year', block_time) AS month,token_bought_symbol AS symbol,amount_usd,tx_hashFROMinfoUNION ALLSELECTdate_trunc('year', block_time) AS month,token_sold_symbol AS symbol,amount_usd,tx_hashFROMinfo),TokenStats AS (SELECTmonth,symbol,SUM(amount_usd) AS USD_Volume,approx_distinct(tx_hash) AS tx_countFROMtokensWHEREmonth > DATE '2019-01-01'GROUP BYmonth, symbol),TokenVolumeCategories AS (SELECTmonth,symbol,USD_Volume,tx_count,CASEWHEN USD_Volume < 100 THEN ' < 100 USD'WHEN USD_Volume BETWEEN 100 AND 1000 THEN ' 100-1k USD'WHEN USD_Volume BETWEEN 1000 AND 10000 THEN ' 1k-10k USD'ELSE ' 10+k USD'END AS volume_categoryFROMTokenStats)SELECTmonth,volume_category,