messari2023-12-11 02:37 PM
    Updated 2023-12-11
    select * from aptos.core.fact_transactions limit 5

    select * from aptos.core.dim_labels

    select
    block_timestamp
    , version
    , split(payload_function, '::')[0] as smart_contract
    , split(payload_function, '::')[1] as module
    , split(payload_function, '::')[2] as function
    , payload
    , payload_function
    , payload :type ::string as payload_type
    , gas_used
    , gas_unit_price
    , (gas_used * gas_unit_price) / pow(10,8) as fee_apt
    , ifnull(label, 'unlabeled') as label
    from aptos.core.fact_transactions
    left join aptos.core.dim_labels
    on split(fact_transactions.payload_function, '::')[0] = dim_labels.address
    where tx_type = 'user_transaction'
    and block_timestamp ::date > current_date() -30

    with labels as (
    select
    add
    )
    Run a query to Download Data