0xHaM-dAll Chain Balance
    Updated 2023-06-17
    with multi_snd as (
    select
    tx_hash,
    logs,
    split_part(value,'Sending ',2) a,
    try_to_numeric(split_part(a,' yNEAR',1))/1e24 as amount,
    split_part(a,'@',2)::string as receiver
    from near.core.fact_receipts, lateral flatten(input => logs) b
    where RECEIVER_ID = 'multisender.app.near'
    and STATUS_VALUE ilike '%SuccessValue%'
    and logs[0] is not NULL
    )
    , multi_send as (
    SELECT
    a.tx_hash,
    tx_signer as sender,
    receiver,
    amount
    FROM multi_snd a join near.core.fact_transactions b USING(tx_hash)
    )
    ,multi_receive as (
    select
    tx_hash,
    split_part(value,'Sending ',2) a,
    split_part(a,'@',2) as receiver,
    try_to_numeric(split_part(a,' yNEAR',1))/1e24 as amount
    from near.core.fact_receipts, lateral flatten(input => logs) b
    where RECEIVER_ID = 'multisender.app.near'
    and STATUS_VALUE ilike '%SuccessValue%'
    and logs[0] is not NULL
    )
    , trans_receive as (
    select
    TX_HASH,
    Run a query to Download Data