LittlerDataLandverse Users profitting copy
    Updated 2024-07-17

    with top_up as ( --top up transactions
    select
    tx_hash
    ,block_timestamp
    ,origin_from_address
    ,decoded_log:amount / 1e18 ION_Cost
    from bsc.core.ez_decoded_event_logs
    where block_timestamp > '2023-09-01'
    and contract_address = '0xe040f599c8904c2be2119b99b072b7764becb238' -- top up contract
    and event_name = 'EventTopup'
    --and tx_hash = '0x7d0a4dc1c0c0ad2ff4c67abec652d47307d68285bde12587983a9d28ba01545e'
    ),


    top_up_users as (
    select
    origin_from_address as user
    ,sum(ion_cost) Total_ION_spent
    ,count(distinct tx_hash) Topups
    from top_up
    group by 1
    ),


    others_type as ( --presales and sales
    select
    tx_hash
    from bsc.nft.ez_nft_transfers
    --join bsc.core.fact_transactions transactions using (tx_hash)
    where block_timestamp > '2023-09-10' --min block_timestamp for the nft address
    --and STATUS = 'SUCCESS'
    and nft_address = '0x9d2e6134af5b63498d15546f2701837f001c6043'
    and event_type = 'other' --sales and redeem events
    --and tx_hash = '0x8400505e11b5315bfd35fa9ceb3f182eb279003d8486e2f33a1d24bf2c2853d3'
    QueryRunArchived: QueryRun has been archived