mlhflow wallet1
    with raw_txs as (
    select ft.block_timestamp,
    ft.tx_id,
    ft.payer,
    fe.event_data:amount as fee
    from flow.core.fact_transactions ft
    left join flow.core.fact_events fe
    on ft.tx_id = fe.tx_id
    where ft.payer <> ft.proposer
    and fe.event_type = 'FeesDeducted'
    and ft.tx_succeeded = TRUE
    )

    select r.block_timestamp::date as fecha,
    r.payer,
    case
    when l.contract_name is null then r.payer
    else l.contract_name
    end as name,
    case payer
    when '0x18eb4ee6b3c026d2' then 'TopShot Marketplace'
    when '0xecfad18ba9582d4f' then 'Joyride'
    when '0x55ad22f01ef568a1' then 'Blocto'
    when '0x4bbff461fa8f6192' then 'Fantastec'
    when '0x62b3063fbe672fc8' then 'Zeedz'
    else payer
    end as payer_id,
    count (r.tx_id) as daily_txs,
    sum (r.fee) as daily_fees,
    sum (daily_txs) over (partition by payer order by fecha) as acc_txs,
    sum (daily_fees) over (partition by payer order by fecha) as acc_fees
    from raw_txs r
    Run a query to Download Data