Abolfazl_771025solend user by number of sol txn
    Updated 2022-08-03
    with solend as (SELECT
    DISTINCT SIGNERS[0]
    from solana.core.fact_transactions
    where block_timestamp >= '2022-01-01'
    and succeeded = 'TRUE'
    and pre_token_balances[0]:mint = 'So11111111111111111111111111111111111111112'
    and pre_token_balances[1]:mint = '5h6ssFpeDeRbzsEHDbTQNH7nVGgsKrZydxdSTnLm6QdV'
    )
    SELECT
    CASE
    WHEN txn BETWEEN 1 and 10 THEN 'Between 1 and 10'
    WHEN txn BETWEEN 10 and 100 THEN 'Between 10 and 100'
    WHEN txn BETWEEN 100 and 1000 THEN 'Between 100 and 1,000'
    ELSE 'over 1,000' END as "txn count group",
    count(*) as users
    FROM (SELECT tx_from,count(DISTINCT tx_id) as txn FROM solana.core.fact_transfers WHERE tx_from in (SELECT * FROM solend)
    GROUP BY 1)
    GROUP BY 1
    Run a query to Download Data