Afonso_DiazOvertime
    Updated 2 days ago
    with

    main as (
    select
    tx_id,
    block_timestamp,
    pool_address,
    provider_address as user,
    pool_name,
    platform,
    token_a_amount_usd + token_b_amount_usd as amount_usd,
    action_type as event_name
    from
    solana.marinade.ez_liquidity_pool_actions
    )

    select
    date_trunc('{{ period }}', block_timestamp) as date,
    event_name,
    count(distinct tx_id) as transactions,
    count(distinct user) as users,
    sum(amount_usd) as volume_usd,
    avg(amount_usd) as average_amount_usd,
    sum(volume_usd) over (partition by event_name order by date) as cumulative_volume_usd
    from
    main
    group by 1, 2
    order by 1, 2

    Last run: 2 days ago
    DATE
    EVENT_NAME
    TRANSACTIONS
    USERS
    VOLUME_USD
    AVERAGE_AMOUNT_USD
    CUMULATIVE_VOLUME_USD
    1
    2021-08-01 00:00:00.000deposit6014692055302.061828558897.4115230673162055302.06182855
    2
    2021-08-01 00:00:00.000withdraw306247855162.210688539717.75239418784855162.21068853
    3
    2021-09-01 00:00:00.000deposit3948378920394902.6160730812620.60805450066822450204.67790163
    4
    2021-09-01 00:00:00.000withdraw1856171712688130.1200048319312.22240487797513543292.33069336
    5
    2021-10-01 00:00:00.000deposit54046225531148124922.890866330963.4553098939141170575127.568768
    6
    2021-10-01 00:00:00.000withdraw1699311845643543830.002575462160.13039723514657087122.3332688
    7
    2021-11-01 00:00:00.000deposit45893805084652974.58069482913.241605777921255228102.1494627
    8
    2021-11-01 00:00:00.000withdraw7405481178834029.0639026624174.801920853315735921151.3971714
    9
    2021-12-01 00:00:00.000deposit67837495776047693.84475951610.5657555330491331275795.9942224
    10
    2021-12-01 00:00:00.000withdraw47203130156311917.674419958918.928637172976892233069.0715914
    11
    2022-01-01 00:00:00.000deposit60154356263084195.073767131278.8978667619591394359991.0679893
    12
    2022-01-01 00:00:00.000withdraw36502306359615623.6826549115706.442626336851251848692.7542462
    13
    2022-02-01 00:00:00.000deposit48998225634803570.03296253878.5452488441891429163561.100952
    14
    2022-02-01 00:00:00.000withdraw2281135861258197.8480174631921.937388232131313106890.6022637
    15
    2022-03-01 00:00:00.000deposit47621176121767123.75169461552.68951228151450930684.8526466
    16
    2022-03-01 00:00:00.000withdraw2228131470340268.898024337335.599202772981383447159.500288
    17
    2022-04-01 00:00:00.000deposit31489165652724564.789046481794.4511874292591503655249.641693
    18
    2022-04-01 00:00:00.000withdraw7778159059456593.106703377811.929195467531442903752.6069913
    19
    2022-05-01 00:00:00.000deposit259831625103526522.223413214050.6503726196581607181771.8651063
    20
    2022-05-01 00:00:00.000withdraw111651710111768080.7489851310032.1408086334381554671833.3559766
    90
    9KB
    3s