rezarwz2023-07-21 05:53 PM
    Updated 2023-07-22
    WITH handles AS (
    SELECT
    tx_hash AS cr_tx_hash,
    DECODED_LOG:handle::string AS username,
    DECODED_LOG:profileId::integer AS profile_id,
    DECODED_LOG:to::string AS creator
    FROM
    bsc.core.ez_decoded_event_logs
    WHERE
    contract_address = '0x2723522702093601e6360cae665518c4f63e9da6'
    AND event_name = 'CreateProfile'
    ),all_mysteri as (
    SELECT
    'eth' as chain,
    tx_hash,
    TOKENID,
    NFT_TO_ADDRESS as claimer_address,
    username
    FROM
    ethereum.core.ez_nft_mints ez inner join handles h on h.creator=ez.NFT_TO_ADDRESS
    WHERE
    nft_address = '0xce4f341622340d56e397740d325fd357e62b91cb'
    UNION all
    SELECT
    'bsc' as chain,
    tx_hash,
    DECODED_LOG:boxId::string as TOKENID,
    DECODED_LOG:to::string as claimer_address,
    username
    FROM
    bsc.core.ez_decoded_event_logs ez inner join handles h on h.creator=ez.DECODED_LOG:to::string
    WHERE
    event_name = 'ClaimBox'
    AND CONTRACT_ADDRESS = '0xcadc6c364e8fcad0f382fddfd6ff5b41d82eb3e4'),
    all_box as(
    SELECT
    Run a query to Download Data