Afonso_DiazOvertime
    Updated 9 days ago
    with

    pricet as (
    select
    hour::date as dt,
    token_address,
    decimals,
    symbol,
    avg(price) as token_price_usd
    from
    aptos.price.ez_prices_hourly
    group by 1, 2, 3, 4
    ),

    main as (
    select
    tx_hash,
    block_timestamp,
    event_data:amount as amount_unadj,
    token_address,
    event_data:actor as user,
    'Supply' as event_name
    from
    aptos.core.fact_events
    join
    aptos.core.fact_transfers transfers using (tx_hash)
    where
    payload_function = '0xccd1a84ccea93531d7f165b90134aa0415feb30e8757ab1632dac68c0055f5c2::entry_public::lend_v2'
    and event_type = '0xccd1a84ccea93531d7f165b90134aa0415feb30e8757ab1632dac68c0055f5c2::lend::LendEvent'
    and transfer_event = 'WithdrawEvent'
    and user = transfers.account_address
    and success

    union all

    select
    Last run: 9 days ago
    DATE
    EVENT_NAME
    TRANSACTIONS
    USERS
    VOLUME_USD
    AVERAGE_AMOUNT_USD
    CUMULATIVE_TRANSACTIONS
    CUMULATIVE_VOLUME_USD
    1
    2024-04-01 00:00:00.000Supply77545273607.26408103294.97711494377573607.264081032
    2
    2024-04-01 00:00:00.000Withdraw24010337921.510632614158.00629430324037921.510632614
    3
    2024-05-01 00:00:00.000Supply790306276906.66297579454.6907438031565350513.927056822
    4
    2024-05-01 00:00:00.000Withdraw2237141137.551337291210.9618017346379059.061969905
    5
    2024-06-01 00:00:00.000Supply1079363167154.316159636222.5756540082644517668.243216457
    6
    2024-06-01 00:00:00.000Withdraw27110562092.878327376249.368989267734141151.940297281
    7
    2024-07-01 00:00:00.000Supply1556790495563.432070766339.42700826842001013231.67528722
    8
    2024-07-01 00:00:00.000Withdraw609331157057.124282681270.3220727761343298209.064579962
    9
    2024-08-01 00:00:00.000Supply13064277117434.077233645941.09689251655068130665.75252086
    10
    2024-08-01 00:00:00.000Withdraw947281289301.540283392328.00628152290587510.604863354
    11
    2024-09-01 00:00:00.000Supply162847018997977.06028612062.207657324713427128642.8128069
    12
    2024-09-01 00:00:00.000Withdraw142236911741746.19857728374.997288571371212329256.8034406
    13
    2024-10-01 00:00:00.000Supply4273120257845194.33548713756.2887837071140784973837.1482939
    14
    2024-10-01 00:00:00.000Withdraw240487932930114.171030913923.938338702611645259370.9744715
    15
    2024-11-01 00:00:00.000Supply4481152537534920.51212919327.76354675215888122508757.660423
    16
    2024-11-01 00:00:00.000Withdraw4169130846976344.332996911770.5698654461028592235715.3074683
    17
    2024-12-01 00:00:00.000Supply4561136537177870.90571419496.26332202120449159686628.566137
    18
    2024-12-01 00:00:00.000Withdraw4342119336540317.3243979636.15963196114627128776032.631865
    19
    2025-01-01 00:00:00.000Supply291896530278165.509206212797.19590414523367189964794.075343
    20
    2025-01-01 00:00:00.000Withdraw349297029630025.730467610227.83076647118119158406058.362333
    28
    3KB
    78s