ramishoowUntitled Query
    Updated 2022-09-18
    WITH ramishoow AS( SELECT concat('0x', replace(regexp_substr(INPUT_DATA, '0xde2ea948000000000000000000000000(........................................)'), '0xde2ea948000000000000000000000000')) AS wallet_address,
    concat('0x', RIGHT(regexp_substr(INPUT_DATA, '0xde2ea948000000000000000000000000........................................000000000000000000000000........................................000000000000000000000000........................................'), 40)) AS index_token, *
    FROM avalanche.core.fact_transactions WHERE ORIGIN_FUNCTION_SIGNATURE = '0xde2ea948' AND BLOCK_TIMESTAMP >= CURRENT_DATE - 6 ) SELECT CASE WHEN index_token = LOWER('0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7') THEN 'WAVAX'
    WHEN index_token = LOWER('0x50b7545627a5162F82A992c33b87aDc75187B218') THEN 'WBTC.e' WHEN index_token = LOWER('0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB') THEN 'WETH.e' ELSE 'others' END AS ticker, index_token, COUNT(*) AS num
    FROM ramishoow GROUP BY 1, 2

    Run a query to Download Data