Updated 2024-11-06
    with

    main as (
    select
    tx_id,
    block_timestamp,
    -- split(split(split(outputs[0]:value, 'arguments: [')[2], ']')[0], ',')[0] as user,
    -- replace(split(split(split(outputs[0]:value, 'arguments: [')[2], ']')[0], ',')[2], 'u64', '')::bigint/1e6 as amount
    from
    aleo.core.fact_transactions
    join
    aleo.core.fact_transitions using (tx_id, block_timestamp)
    where
    tx_succeeded
    and execution_msg ilike '%ans_registrar.aleo%'
    and function = 'transfer_public_as_signer'

    -- union all

    -- select
    -- tx_id,
    -- block_timestamp,
    -- split(split(split(outputs[0]:value, 'arguments: [')[2], ']')[0], ',')[0] as user,
    -- split(split(split(outputs[0]:value, 'arguments: [')[2], ']')[0], ',')[2] as amount
    -- from
    -- aleo.core.fact_transactions
    -- join
    -- aleo.core.fact_transitions using (tx_id, block_timestamp)
    -- where
    -- tx_succeeded
    -- and execution_msg ilike '%validate_name%'
    -- and execution_msg ilike '%ans_registrar.aleo%'
    -- and function = 'register_fld'
    )

    select
    QueryRunArchived: QueryRun has been archived