Sbhn_NPSuppliers Summary
    Updated 2025-02-09
    with price as (
    select hour::date as datee,
    token_address ,
    avg(price) as usdprice
    from aptos.price.ez_prices_hourly
    group by 1,2
    )

    select
    DISTINCT ACCOUNT_ADDRESS as "Suppliers",
    sum(amount/pow(10,decimals)*usdprice) as "Supplied USD",
    count(DISTINCT block_timestamp::date) as "Active Days"
    from aptos.core.fact_transfers a
    join aptos.core.fact_transactions using(tx_hash)
    join price p on block_timestamp::date=datee and a.token_address=p.token_address
    left join aptos.core.dim_tokens t on a.token_address=t.token_address
    where payload:function = '0xeab7ea4d635b6b6add79d5045c4a45d8148d88287b1cfa1c3b6a4b56f46839ed::router::supply_simple'
    and transfer_event = 'WithdrawEvent'
    and block_timestamp::date >= '2024-10-10'
    group by 1
    order by 2 desc
    Last run: about 2 months ago
    Suppliers
    Supplied USD
    Active Days
    1
    0xa359d79dc4db02a7c02970e9aace3a9606a44bb2da825d2548efb8c824e9dcb88117860.552
    2
    0x99d738da85f335edf27e6f5f5567caaa7cc82cb336f64da4b95a45ec3cc6ee6e6204924.166666672
    3
    0x9e0bd4e7e1b22f19ad7c533d666220b7cef416770277348a47bc4bfd02726eb85115742.52
    4
    0xd3a40691a998cfaf00a6f69c4776df67317bbcc246488c1186adbe7d6ea3d51e4946017.157083333
    5
    0xefec0991b7669c52a9115b6c058f36390f8f9cdd3a4817b2a850e6472467f5023932253.889583333
    6
    0x6876f274d5a0e715f0bfa5ffd306f076b8a3904476015275159ed3d0c600c45b3770966.666666671
    7
    0x2436a747c010be3e408df4a779e89145c0c3dfd60df51e8aeceee07f754e54aa3766421.753
    8
    0xacb57f769012dca0a29d04625d6c7013584f35e55e48715de3f29ea265b1b2513349659.251
    9
    0x550cc9d4849d2d253d1877e6ffb5b3b4c69c61be5ffe337cba70a9499cb15b943141518.333325481
    10
    0x121ed48962169f2d0670380fc8768bfa0d713dea51c176496274808c4b6a75ab3018779.166666671
    11
    0x491d11cec909cc6bffe491be88fd00b4a83ed295128de5c3662993457bbc314d2845295.251
    12
    0xdad6f478a56da5187dbebc097d1cd30fce8d8db8b96a70d3c9e357e5247807692758020.833333331
    13
    0xc02d71acccd1f61a4549873e082202ea66ef0cc226142c854badf3dde20110d32750900.08751
    14
    0x4efb6f4c7bcc03a4eb6670c2b8ae81caa85e56439ba17a8bcf5cfa2ce1ddbb362077906.420931812
    15
    0x3535c9b6b97d6c9c5528592ca9db3dc124b11cc1e82023e8b02bc382d03d6e6514992591
    16
    0x788c7cf8d95e448468becbf6b0e783e1fb9e68a1f83607df8db145b607c996191490392.751
    17
    0x45650da62abcf00be5d08b524016f938e5f9b38a3f9bba5d19bc1205d4d3605f1380666.692083334
    18
    0xc713ec98b5c9a60504e638cb2de7867b27329693536c73f8b94a867f649d331b1187642.011
    19
    0xce4d7ede6f5f6686668de36c6a674febd5605524282b5b0cce1ee99440257198389650.1522425073
    20
    0x79fcbdfaf07426b1953b7ad2f3a0f73e020ee4d4419e2765676199be78f2d904340853.751
    ...
    13611
    1MB
    208s