Hessishpy -feed types daily
    Updated 2025-03-01

    with spons_addy as (
    SELECT
    DISTINCT tx_hash as hash ,
    SENDER as addy
    from aptos.core.fact_transactions
    where
    BLOCK_TIMESTAMP::date >= '{{Starting_date}}'

    and sender = '0x2d91309b5b07a8be428ccd75d0443e81542ffcd059d0ab380cefc552229b1a'),

    spons_fees as


    (SELECT EVENT_DATA:price_feed:price_identifier:bytes::string as feed_id
    from aptos.core.fact_events join spons_addy on tx_hash = hash
    where
    BLOCK_TIMESTAMP::date >= '{{Starting_date}}'
    and
    EVENT_RESOURCE = 'PriceFeedUpdate'
    GROUP by all )


    SELECT BLOCK_TIMESTAMP::date as date ,count(DISTINCT tx_hash) as updates , 'Sponsored feeds' as type
    from aptos.core.fact_events
    where
    BLOCK_TIMESTAMP::date >= '{{Starting_date}}'
    and
    EVENT_RESOURCE = 'PriceFeedUpdate'
    and EVENT_DATA:price_feed:price_identifier:bytes::string in (SELECT DISTINCT feed_id from spons_fees)
    GROUP by all


    union


    QueryRunArchived: QueryRun has been archived