Flipside Team$MEW Holders
    Updated 2024-09-06
    with flows as (
    select
    TX_to as User_address,
    sum(AMOUNT) as flow
    from solana.core.fact_transfers
    where mint = 'MEW1gQWJ3nEXg2qgERiKu7FAFj79PHvQVREQUzScPP5'
    group by 1

    union all

    select
    TX_from as User_address,
    sum(-AMOUNT) as flow
    from solana.core.fact_transfers
    where mint = 'MEW1gQWJ3nEXg2qgERiKu7FAFj79PHvQVREQUzScPP5'
    group by 1
    ),
    main as (
    select
    User_address,
    sum(flow) as Holding_Balance
    from flows
    group by 1
    order by Holding_Balance desc
    )
    select
    count(DISTINCT User_address) as N_Holders
    from main
    where Holding_Balance > 0.1
    QueryRunArchived: QueryRun has been archived