rezarwztakers key metrics
    Updated 2024-09-07
    with all_takers as (
    SELECT
    tx_hash,
    block_timestamp,
    decoded_log:taker as taker_Ad,
    case
    when (decoded_log:taker, block_timestamp) in (
    SELECT
    decoded_log:taker,
    min(block_timestamp)
    from
    blast.core.ez_decoded_event_logs
    where
    contract_address = '0xb1a49c54192ea59b233200ea38ab56650dfb448c'
    and event_name = 'OrderComplete'
    group by
    1
    ) then 'New User'
    else 'Returning User'
    end as user_type
    from
    blast.core.ez_decoded_event_logs
    where
    contract_address = '0xb1a49c54192ea59b233200ea38ab56650dfb448c'
    and event_name = 'OrderComplete'
    ),
    last_24 as (
    SELECT
    count(DISTINCT taker_Ad) as last_24
    FROM
    all_takers
    WHERE
    block_timestamp > TIMESTAMPADD(HOUR, -24, CURRENT_TIMESTAMP)
    ),
    last_7_d as (
    SELECT
    Last run: 6 days ago
    LAST_24
    LAST_7_DAY
    LAST_30_DAY
    TOTAL_TAKER
    1
    0017861
    1
    14B
    44s