bachisweat1
    Updated 2022-09-22
    select
    case when tx_receiver = 'token.sweat' then 'Sweat Token' when tx_receiver like '%token.near%' then 'Near token' else 'Other Token' end as token_type,
    count(
    distinct(tx_hash)
    ) as no_of_txns,
    count(
    distinct(tx_signer)
    ) as no_of_users,
    round(no_of_txns / no_of_users, 2) as avg_txns_per_day
    from
    near.core.fact_transactions
    where
    tx_status = 'Success'
    and block_timestamp >= dateadd(
    month,
    -3,
    getdate()
    )
    group by
    token_type

    Run a query to Download Data