Query editor
WITH raw_data AS (-- Cache and prepare raw data starting from Uniswap V4 launchSELECT--blockchain,version,--block_month,date_trunc('week', block_time) as week,token_bought_address||token_sold_address as pool,--token_pair,amount_usd,taker,tx_hashFROM dex.tradesWHEREblock_time > CAST('2025-01-30' as date) --partition filter, launch of uniswap v4AND project = 'uniswap'AND version IN ('3', '4'))SELECTversion,week,approx_distinct(pool) as pairs_qty,approx_distinct(taker) as wallets_qty,SUM(amount_usd) as amount_usd,approx_distinct(tx_hash) as tx_qtyFROM raw_dataGROUP BY 1,2