Updated 2024-02-20
    with pricet as (
    SELECT
    HOUR::date as pdate,
    avg(price) as usd
    from crosschain.price.ez_hourly_token_prices
    where SYMBOL = 'WETH'
    group by 1
    )

    SELECT
    date_trunc('day', TIMESTAMP) as days,
    count(distinct tx_hash) as txs,
    count(distinct CONTRACT) as users,
    sum(ACTUAL_FEE/pow(10,18)) as "Paid Fee (ETH)",
    sum((ACTUAL_FEE * usd)/pow(10,18)) as "Paid Fee (USD)"
    from external.tokenflow_starknet.decoded_transactions
    left join pricet on pdate = TIMESTAMP::date
    where CHAIN_ID = 'mainnet'
    and TIMESTAMP < current_date
    group by 1
    order by 1 asc
    Last run: about 1 year ago
    DAYS
    TXS
    USERS
    Paid Fee (ETH)
    Paid Fee (USD)
    1
    2021-11-16 00:00:00.000691800
    2
    2021-11-17 00:00:00.0001301900
    3
    2021-11-18 00:00:00.0001913900
    4
    2021-11-19 00:00:00.0001545300
    5
    2021-11-20 00:00:00.0001535600
    6
    2021-11-21 00:00:00.0001506900
    7
    2021-11-22 00:00:00.0001537500
    8
    2021-11-23 00:00:00.0001538700
    9
    2021-11-24 00:00:00.0002989200
    10
    2021-11-25 00:00:00.000131114100
    11
    2021-11-26 00:00:00.000172730800
    12
    2021-11-27 00:00:00.0001533100
    13
    2021-11-28 00:00:00.0001545300
    14
    2021-11-29 00:00:00.0001625200
    15
    2021-11-30 00:00:00.0001496600
    16
    2021-12-01 00:00:00.0001957900
    17
    2021-12-02 00:00:00.0002859400
    18
    2021-12-03 00:00:00.0002098900
    19
    2021-12-04 00:00:00.0001589000
    20
    2021-12-05 00:00:00.0001989400
    ...
    808
    49KB
    37s