0xHaM-dnear here impact - transactions info copy
    Updated 2024-10-05
    -- forked from MoDeFi / near here impact - transactions info @ https://flipsidecrypto.xyz/MoDeFi/q/viPB_uyydqiT/near-here-impact---transactions-info

    -- select
    -- case
    -- when ifnull(tx:actions[0]:Delegate:delegate_action:receiver_id::string, TX_RECEIVER) ilike 'tg'
    -- or ifnull(tx:actions[0]:Delegate:delegate_action:receiver_id::string, TX_RECEIVER) ilike '%.hot.tg'
    -- or ifnull(tx:actions[0]:Delegate:delegate_action:receiver_id::string, TX_RECEIVER) ilike '%.herewallet.near'
    -- then 'Here Wallet' else 'Other' end as "Type",
    -- count(*) as "Transactions",
    -- count(distinct ifnull(tx:actions[0]:Delegate:delegate_action:sender_id::string, TX_SIGNER)) as "AUs",
    -- sum(TRANSACTION_FEE/1e24) as "Fees"
    -- from near.core.fact_transactions
    -- where TX_SUCCEEDED=true
    -- and BLOCK_TIMESTAMP::date>='2023-10-01'
    -- group by 1
    -- order by 1 desc

    with hereW as (
    select
    BLOCK_TIMESTAMP,
    case
    when ifnull(tx:actions[0]:Delegate:delegate_action:receiver_id::string, TX_RECEIVER) ilike 'tg'
    or ifnull(tx:actions[0]:Delegate:delegate_action:receiver_id::string, TX_RECEIVER) ilike '%.hot.tg'
    or ifnull(tx:actions[0]:Delegate:delegate_action:receiver_id::string, TX_RECEIVER) ilike '%.herewallet.near'
    then 'Here Wallet' else 'Other' end as type,
    TX_HASH,
    ifnull(tx:actions[0]:Delegate:delegate_action:sender_id::string, TX_SIGNER) as user,
    TRANSACTION_FEE/1e24 as fee
    from near.core.fact_transactions
    where TX_SUCCEEDED=true
    and BLOCK_TIMESTAMP::date>='2023-10-01'
    )
    -- ,
    -- mainTb as (
    SELECT
    QueryRunArchived: QueryRun has been archived