iboo-jbj2MVMost taken actions by users
    Updated 2022-04-17
    with wallets as(SELECT
    INNER_INSTRUCTION:instructions[2]:parsed:info:source
    FROM solana.fact_events
    WHERE program_id = 'mRefx8ypXNxE59NhoBqwqb3vTvjgf8MYECp4kgJWiDY'
    and date(block_timestamp) BETWEEN '2022-03-01' and '2022-04-01'
    )
    select
    case
    when program_id ='MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD' then 'staking'
    when program_id ='farmL4xeBFVXJqtfxCzU9b28QACM7E2W2ctT6epAjvE' then 'farming'
    when program_id ='JUP2jxvXaqu7NQY1GmNF4m1vodw12LVXYxbFL2uJvfo' then 'Swapping'
    when program_id ='bankHHdqMuaaST4qQk6mkzxGeKPHWmqdgor6Gs8r88m' then 'mining'
    end as actions,
    count(distinct INNER_INSTRUCTION:instructions[2]:parsed:info:source) as users
    from solana.fact_events
    where INNER_INSTRUCTION:instructions[2]:parsed:info:source in (select * from wallets)
    and date(block_timestamp) BETWEEN '2022-03-01' and '2022-04-01'
    group by 1 having actions is not null
    Run a query to Download Data