iboo-jbj2MVNumber of participants in solana porograms
    Updated 2022-03-13
    with saber as (SELECT
    inner_instruction:instructions[0]:parsed:info:authority as users,
    sum (inner_instruction:instructions[0]:parsed:info:amount/1e6) as amount
    from solana.events
    where instruction:programId='LocktDzaV1W2Bm9DeZeiyz4J9zs4fRqNiYqQyracRXw'
    and PRETOKENBALANCES[0]:mint='Saber2gLauYim4Mvftnrasomsv6NvAuncvMEZwcLpD1'
    and succeeded = 'TRUE'
    and block_timestamp >'2022-01-31' and block_timestamp <'2022-03-01'
    and users is not null
    group by 1
    order by 2 desc
    limit 20)

    select instruction:programId as program_id,
    count(program_id) as usage_count
    from solana.events
    where
    inner_instruction:instructions[0]:parsed:info:authority in (select users from saber)
    and block_timestamp BETWEEN '2022-01-31' and '2022-03-01'
    group by program_id
    order by usage_count DESC