vilppuamount_gambled_eth
    Updated 2024-03-31
    with moon_or_dooms as (
    select
    inserted_timestamp,
    tx_hash,
    event_index,
    event_name,
    decoded_log,
    decoded_log['amount']::float as amount,
    from
    blast.core.ez_decoded_event_logs
    where
    contract_address = lower('0x693B37a9859Ce9465Fb2aAdeB03811a26A0c37C0')
    and ORIGIN_FROM_ADDRESS in (lower('{{param_6opm}}'), lower('{{param_EXn7}}'))
    and TX_STATUS = 'SUCCESS'
    ),

    actions as (
    select
    date(inserted_timestamp) as daily_timestamp,
    event_name,
    sum(amount)/1e18 as amount_gambled,
    from moon_or_dooms
    where event_name != 'Claim'
    group by 1, 2
    )

    select *, from actions
    QueryRunArchived: QueryRun has been archived