jfoUntitled Query
    Updated 2022-06-24
    with data_address as (
    select
    instruction:accounts[0] as address,
    case
    when inner_instruction:instructions[1]:parsed:type = 'mintTo' then
    inner_instruction:instructions[1]:parsed:info:account
    else
    inner_instruction:instructions[3]:parsed:info:account
    end
    as account_address,
    case
    when inner_instruction:instructions[1]:parsed:type = 'mintTo' then
    inner_instruction:instructions[1]:parsed:info:mint
    else
    inner_instruction:instructions[3]:parsed:info:mint
    end
    as contract_address,
    min(block_timestamp) as min_block_timestamp
    from
    solana.core.fact_events
    where
    program_id = 'wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb'
    and
    instruction:data = '4' -- retrieve from other chains
    and
    (
    inner_instruction:instructions[1]:parsed:type = 'mintTo' -- have careated associated token account
    or
    inner_instruction:instructions[3]:parsed:type = 'mintTo' -- not yet created associated token account
    )
    and
    succeeded = true
    and
    block_timestamp::date >= CURRENT_DATE - 60
    group by 1, 2, 3
    )
    Run a query to Download Data