Query editor
with users as (selectday,blockchain ,count(distinct user) as usersfrom (select blockchain, taker as user, min(date_trunc('day',block_date)) as day from uniswap.trades where version = '3' and date_trunc('day',block_date) >= now() - interval '{{Enter Period in Days}}' day group by 1,2)group by 1,2),pairs as (selectday,blockchain ,count(distinct pair) as pairsfrom (select blockchain, token_pair as pair, min(date_trunc('day',block_date)) as day from uniswap.trades where version = '3' and date_trunc('day',block_date) >= now() - interval '{{Enter Period in Days}}' day group by 1,2)group by 1,2),trades as (Selecttrades.blockchain,date_trunc('day',trades.block_date) as day,count(distinct trades.tx_hash) as trades,sum(amount_usd) as usd_volume,sum( amount_usd * cast(fee as double)/1e6) as fees,sum(tx_fee_usd) as gas_feesfromuniswap.trades tradesleft join uniswap.pools pools on trades.blockchain = pools.blockchain and pools.pool = trades.project_contract_addressleft join gas.fees gas on gas.blockchain = trades.blockchain and trades.tx_hash = gas.tx_hash and gas.block_date >= NOW() - INTERVAL '{{Enter Period in Days}}' daywheretrades.version = '3'and date_trunc('day',trades.block_date) >= now() - interval '{{Enter Period in Days}}' daygroup by1, 2),tokens as (selectblockchain,day,count(distinct token) as tokensfrom(selectblockchain,token,min(day) as dayfrom(select distinctdate_trunc('day',block_date) as day,blockchain,token_bought_address as tokenfromuniswap.tradeswhereversion = '3'and date_trunc('day',block_date) >= now() - interval '{{Enter Period in Days}}' day