Kaskoazul2023-04-03 11:36 PM
    Updated 2023-04-03
    -- select block_timestamp,
    -- signer_id as user,
    -- node,
    -- node_data,
    -- node_data:follow
    -- from near.social.fact_decoded_actions
    -- where node = 'graph'



    WITH tx_with_method AS (
    SELECT
    ft.block_id
    , COALESCE(ft.block_timestamp, b.block_timestamp) AS block_timestamp
    , ft.tx_hash
    , SPLIT_PART(ft.action_id, '-', 2) AS action_no
    , ft.action_name
    , ft.method_name
    , ft.args
    , ft.deposit / POW(10,24) AS deposit_near
    , t.tx_signer as user_name
    , t.tx_receiver
    , PARSE_JSON(args) as message
    FROM
    near.core.fact_actions_events_function_call ft
    LEFT JOIN
    near.core.fact_blocks b
    ON
    ft.block_id = b.block_id
    LEFT JOIN
    near.core.fact_transactions t
    ON
    ft.tx_hash = t.tx_hash
    WHERE
    t.tx_receiver = 'social.near' -- RECEIVER ADDRESS FOR NEAR SOCIAL NETWORK
    AND t.tx_status = 'Success' -- NOT COUNT FAILED TRANSACTIONS
    Run a query to Download Data