bintuparisUSDC Liquidity on Each Platform copy
    Updated 2024-08-11
    -- forked from Eman-Raz / USDC Liquidity on Each Platform @ https://flipsidecrypto.xyz/Eman-Raz/q/0jZtJqQFF0xm/usdc-liquidity-on-each-platform

    with user AS( select
    to_address,
    COUNT(DISTINCT from_address) AS total_count,
    sum(AMOUNT) as Volume
    from
    bSC.core.EZ_token_transfers
    where
    CONTRACT_ADDRESS LIKE '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d'
    and from_address != '0x0000000000000000000000000000000000000000'
    and block_timestamp >= current_date - interval '6 months'
    GROUP BY
    1)

    SELECT u.*, l.address_name, l.project_name
    FROM user u
    left JOIN bsc.core.dim_labels l
    ON u.to_address = l.address
    where total_count > 1000
    order by volume desc
    limit 20
    QueryRunArchived: QueryRun has been archived