Specterkaito claim agg
    Updated 2025-03-01
    -- --kaito airdrop
    -- SELECT
    -- -- e.Block_timestamp,
    -- COUNT(DISTINCT e.tx_hash) AS total_claim,
    -- COUNT(DISTINCT e.origin_from_address) AS claimer,
    -- SUM(CAST(livequery.utils.udf_hex_to_int(e.data) AS DOUBLE) / 1e18) AS Amount,
    -- SUM(t.value) AS claiming_charge
    -- FROM base.core.fact_event_logs e
    -- JOIN base.core.fact_transactions t
    -- ON e.tx_hash = t.tx_hash
    -- WHERE e.origin_to_address = '0xeb7d383b0c77ea0bed28b42d0c288f9071bd8a7a'
    -- AND e.contract_address = '0x98d0baa52b2d063e780de12f615f963fe8537553'
    -- AND e.tx_hash = '0x46a043550f3444f827d6d3a404140728f99c4ea1b6f1587250946ad67839ca86';


    SELECT
    COUNT(DISTINCT t1.tx_hash) AS total_transactions,
    SUM(t1.amount_precise) AS total_amount_claimed,
    AVG(t1.amount_precise) AS avg_amount_claimed,
    SUM(t2.value) AS total_value,
    COUNT(DISTINCT t1.origin_from_address) AS total_claimer
    FROM base.core.ez_token_transfers t1
    JOIN base.core.fact_transactions t2
    ON t1.tx_hash = t2.tx_hash
    WHERE t1.contract_address = '0x98d0baa52b2d063e780de12f615f963fe8537553'
    AND t1.origin_to_address = '0xeb7d383b0c77ea0bed28b42d0c288f9071bd8a7a';




    QueryRunArchived: QueryRun has been archived