SalehT-J-small fish have taken
    Updated 2022-12-18
    --***********************************************Check Balace************************************************************
    with lst_single_send as (
    select
    TX_HASH
    ,try_parse_json( TX:actions[0]) as a
    ,split_part(a,'{"',2) as task
    ,split_part(a,':',2) as check1
    , split_part(a,':',3) as amount_char
    ,to_number(regexp_replace(amount_char , '[^0-9]'))/1e24 as amount
    -- ,TX_RECEIVER as receiver
    ,TX_SIGNER as sender
    from near.core.fact_transactions
    where
    task='Transfer":'
    and check1='{"deposit"'
    and block_timestamp::date >=CURRENT_DATE-90
    )
    , lst_tx_send_multi as (
    select
    tx_signer
    ,tx_hash
    from near.core.fact_transactions
    where TX_RECEIVER='multisender.app.near'
    and block_timestamp::date >=CURRENT_DATE-90
    )

    , lst_send_multi as (
    select
    tx_signer as sender
    ,args
    ,f.value:amount/1e24 as amount
    from near.core.fact_actions_events_function_call fc
    join lst_tx_send_multi on lst_tx_send_multi.tx_hash = fc.tx_hash
    ,table(flatten(parse_json(args),path=>'accounts',OUTER => false,RECURSIVE => false)) f
    where METHOD_NAME='multisend_from_balance_unsafe'
    and block_timestamp::date >=CURRENT_DATE-90
    Run a query to Download Data