Query editor
WITH config AS (SELECT * from query_5809291),pool AS (SELECTevt_block_time AS creation_timestamp,pool AS pool_address,token0 AS token0_address,token1 AS token1_addressFROM uniswap_v3_ethereum.Factory_evt_PoolCreatedWHERE pool in (SELECT UNISWAP_SAFE_WETH_POOL from config)UNION ALLSELECTevt_block_time AS creation_timestamp,pair AS pool_address,token0 AS token0_address,token1 AS token1_addressFROM uniswap_v2_ethereum.Factory_evt_PairCreatedWHERE pair in (SELECT UNISWAP_SAFE_WETH_POOL from config)),tokens AS (SELECTpool.token0_address AS token0_address,pool.token1_address AS token1_address,token0_data.symbol AS token0_symbol,token1_data.symbol AS token1_symbol,token0_data.decimals AS token0_decimals,token1_data.decimals AS token1_decimalsFROM poolLEFT JOIN (SELECTcontract_address,decimals,CASE WHEN (symbol = 'eth') THEN 'weth' ELSE symbol END AS symbolFROM tokens.erc20) AS token0_dataON pool.token0_address = token0_data.contract_addressLEFT JOIN (SELECTcontract_address,decimals,CASE WHEN (symbol = 'eth') THEN 'weth' ELSE symbol END AS symbolFROM tokens.erc20) AS token1_dataON pool.token1_address = token1_data.contract_address),token_transfers AS (SELECTevt_tx_hash,pool.pool_address,transfers.contract_address,transfers.evt_block_time,tokens.token0_address AS token0_address,tokens.token1_address AS token1_address,tokens.token0_symbol AS token0_symbol,tokens.token1_symbol AS token1_symbol,CASE