banbannardCross Usage in Solana Defi
    Updated 2022-04-17
    with base as (select distinct(instruction:accounts[0]) as depositors
    from solana.fact_events
    where program_id = 'VoLT1mJz1sbnxwq5Fv2SXjdVDgPXrb9tJyC8WpMDkSp'
    and depositors is not null)

    select program_id,
    address_name,
    label_type,
    case
    when program_id = 'TLPv2tuSVvn3fSk8RgW3yPddkp5oFivzZV3rA9hQxtX' then 'Tulip'
    when program_id = 'FLEET1qqzpexyaDpqb2DGsSzE2sDCizewCg9WjrA6DBW' then 'Star Atlas'
    when program_id = '9tiP8yZcekzfGzSBmp7n9LaDHRjxP2w7wJj8tpPJtfG' then 'Mercurial'
    when program_id = '4bcFeLv4nydFrsZqV5CgwCVrPhkQKsXtzfy2KyMz7ozM' then 'Star Atlas'
    when program_id = 'M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K' then 'Magic Eden Marketplace'
    else address_name
    end as address_names,
    creator,
    count(distinct(tx_id)) as count_tx
    from solana.transactions a
    left join solana.dim_labels b
    on a.program_id = b.address
    where tx_from_address in (select depositors from base)
    and succeeded = 'TRUE'
    --and label_type <> 'chadmin'
    group by 1,2,3,5
    order by 6 desc
    Run a query to Download Data