Updated 2024-01-29
    select
    date_trunc('{{Time_basis}}',BLOCK_TIMESTAMP) as date,
    count(*) as "Transactions",
    count(distinct signers[0]) as "Users",
    sum(FEE/1e9) as "Paid fee in SOL",
    sum("Transactions") over (order by date) as "Total transactions",
    sum("Users") over (order by date) as "Total Users"
    from solana.core.fact_transactions s
    join (select distinct block_timestamp, tx_id
    from solana.core.fact_events where succeeded = True
    and program_id = '5D9yi4BKrxF8h65NkVE1raCCWFKUs5ngub2ECxhvfaZe'
    ) events
    using(tx_id, block_timestamp)
    join lateral flatten (input => log_messages) logs
    where BLOCK_TIMESTAMP >= current_date-{{Days_back}}
    and logs.value ilike 'Program log: Instruction%'
    group by 1


    Last run: about 1 year agoAuto-refreshes every 6 hours
    DATE
    Transactions
    Users
    Paid fee in SOL
    Total transactions
    Total Users
    1
    2024-01-29 00:00:00.0001030.000118613
    2
    2024-01-22 00:00:00.0002230.000277610
    3
    2024-01-01 00:00:00.0001520.000295152
    4
    2024-01-15 00:00:00.0001930.000125547
    5
    2024-01-08 00:00:00.0002020.00014354
    5
    235B
    151s