Deebs-DeFi-j9fRbzTotal Fees Over Time (forked from Socio Crypto and edited)
    Updated 2025-02-09
    SELECT
    date,
    fees as daily_fees,
    SUM(fees) over (ORDER BY date) as cumulative_fee,
    AVG(fees) over (ORDER BY date rows BETWEEN 7 PRECEDING and current row) as days_7_average_fees,
    AVG(fees)over (ORDER BY date rows BETWEEN 30 PRECEDING and current row) as days_30_average_fees

    FROM external.defillama.fact_protocol_fees_revenue
    WHERE chain = 'avalanche'
    and protocol = 'Avalanche'
    AND date>current_date()-{{Date_Range}}
    ORDER by date DESC




    Last run: 3 months ago
    DATE
    DAILY_FEES
    CUMULATIVE_FEE
    DAYS_7_AVERAGE_FEES
    DAYS_30_AVERAGE_FEES
    1
    2025-02-09 00:00:00.0007247368816940987.2521216.516
    2
    2025-02-08 00:00:00.0008273368092241497.87521347.935
    3
    2025-02-07 00:00:00.00012909367264942136.62521562.129
    4
    2025-02-06 00:00:00.00013369365974042053.521640.645
    5
    2025-02-05 00:00:00.00012185364637141989.62521691.58
    6
    2025-02-04 00:00:00.00018337363418641760.37521606.741
    7
    2025-02-03 00:00:00.000203554361584942180.12521359.612
    8
    2025-02-02 00:00:00.00052024341229517847.62515162.322
    9
    2025-02-01 00:00:00.00011332336027112557.87513795.225
    10
    2025-01-31 00:00:00.00013383334893912989.7513663.322
    11
    2025-01-30 00:00:00.00012244333555613039.62513472.354
    12
    2025-01-29 00:00:00.00012858332331212869.62513407.387
    13
    2025-01-28 00:00:00.00010351331045413039.62513182.483
    14
    2025-01-27 00:00:00.00021695330010317626.62513046.129
    15
    2025-01-26 00:00:00.0008894327840817124.12512659.677
    16
    2025-01-25 00:00:00.0009706326951417819.7512641.516
    17
    2025-01-24 00:00:00.00014787325980818114.37512618.935
    18
    2025-01-23 00:00:00.0001378232450211819712531
    19
    2025-01-22 00:00:00.00010884323123918467.12512617.903
    20
    2025-01-21 00:00:00.00014218322035518186.2512641.096
    90
    5KB
    5s