lagandispenserTop 10 whallets amount
    Updated 2022-08-03
    with solned_tx_ids as (select
    tx_id ,
    INNER_INSTRUCTION:instructions[0]:parsed:info:amount/1e6 amount
    from solana.core.fact_events
    where INSTRUCTION:programId = 'So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo'
    and INNER_INSTRUCTION:instructions[0]:parsed:info:amount is not NULL
    and SUCCEEDED=true
    group by 1,2
    ),
    solend_tokens as (
    select
    PRE_TOKEN_BALANCES[0]:owner user_wallet ,
    LABEL,
    amount,
    tx_id ,
    BLOCK_TIMESTAMP::date BLOCK_TIMESTAMP
    from solana.core.fact_transactions join solned_tx_ids using (tx_id)
    join solana.core.dim_labels
    on PRE_TOKEN_BALANCES[0]:mint = ADDRESS
    where SUCCEEDED=true and block_timestamp >= '2022-01-01'

    )

    select BLOCK_TIMESTAMP date ,
    LABEL,
    sum (amount) total_amount ,
    count (tx_id) num_transactions ,
    count (DISTINCT user_wallet ) num_wallets
    from solend_tokens
    --WHERE amount <= 1000000000
    group by 1
    Run a query to Download Data