Query editor
WITH pairs_created 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 '2' 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 '2' 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 pairs_created 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)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_launchFROM token_info;