Query editor
WITH recently_created_pairs AS (SELECT contract_address, pair, token0, token1, evt_block_time, evt_tx_hashFROM uniswap_v2_ethereum.Factory_evt_PairCreatedWHERE evt_block_time > (DATE_TRUNC('hour', CURRENT_TIMESTAMP) - INTERVAL '{{day}}' day)UNION ALLSELECT contract_address, pool as pair, token0, token1, evt_block_time, evt_tx_hashFROM uniswap_v3_ethereum.Factory_evt_PoolCreatedWHERE evt_block_time > (DATE_TRUNC('hour', CURRENT_TIMESTAMP) - INTERVAL '{{day}}' day)),token_info AS (SELECTtxns."from" as deployer,t.pair,t.token0,t.token1,t.evt_block_time,COALESCE(token0_info.symbol, 'Symbol Not Known') AS token0_symbol,COALESCE(token0_info.decimals, 0) AS token0_decimal,COALESCE(token1_info.symbol, 'Symbol Not Known') AS token1_symbol,COALESCE(token1_info.decimals, 0) AS token1_decimalFROM recently_created_pairs tJOIN ethereum.transactions txns ON t.evt_tx_hash = txns.hashLEFT JOIN tokens.erc20 token0_info ON t.token0 = token0_info.contract_addressLEFT JOIN tokens.erc20 token1_info ON t.token1 = token1_info.contract_address),recent_pair_info AS (SELECTdeployer,pair,token0,token0_symbol AS token0_name,token0_decimal AS token0_decimals,token1,token1_symbol AS token1_name,token1_decimal AS token1_decimals,CASEWHEN date_diff('hour', evt_block_time, CURRENT_TIMESTAMP) < 1 THEN 0ELSE date_diff('hour', evt_block_time, CURRENT_TIMESTAMP)END AS hours_since_recent_launchFROM token_info),earliest_deployer_activity AS (SELECT "from" AS deployer, MIN(block_time) AS first_activity_timeFROM ethereum.transactionsGROUP BY "from"),deployer_occurrences AS (SELECT deployer, COUNT(*) AS deployer_countFROM recent_pair_infoGROUP BY deployer),aggregated_and_ranked_trades AS (SELECTROW_NUMBER() OVER (ORDER BY SUM(trade_data.amount_usd) DESC) AS rank_by_volume,trade_data.project_contract_address AS contract_address,recent_pair.deployer AS recent_deployer,SUM(trade_data.amount_usd) AS total_volume_usd,COUNT(DISTINCT trade_data.tx_from) AS unique_address_count,recent_pair.hours_since_recent_launch,eda.first_activity_time,