Hessishar tr
    Updated 2025-05-05
    with mints as (select a.BLOCK_TIMESTAMP, b.EVENT_DATA:to as minter, a.tx_hash, a.EVENT_DATA:nft_id as id,
    a.EVENT_DATA:price/1e8 as launchpad_fee
    from movement.core.fact_events a
    join movement.core.fact_events b
    on a.tx_hash = b.tx_hash
    where --tx_hash = '0xf46d0a7b539004dc55106a116034e2eacf61ba5066ce298d1ab1180a85eb6acf' and
    a.EVENT_RESOURCE = 'MintNftEvent'
    and a.EVENT_MODULE = 'launchpad'
    and a.EVENT_DATA:collection_id = 'aa5eb001-14af-4915-8f3c-24befe15d884'
    and a.SUCCESS = 'true'
    and b.EVENT_RESOURCE = 'Transfer'),

    prices as (SELECT HOUR::date as date1, avg(close) as pr
    from crosschain.price.fact_prices_ohlc_hourly
    where ASSET_ID = 'movement'
    and PROVIDER = 'coingecko'
    GROUP by all
    ),

    trades as (select BLOCK_TIMESTAMP,
    EVENT_DATA:price/1e8 as price,
    EVENT_DATA:token:inner as id,
    EVENT_DATA:bid_buyer as buyer,
    EVENT_DATA:bid_seller as seller,
    TX_HASH
    from movement.core.fact_events
    where block_timestamp >= '2025-03-27 15:00:00.000' and
    id in (select id from mints) and
    EVENT_ADDRESS = '0xf81bea5757d1ff70b441b1ec64db62436df5f451cde6eab81aec489791f22aa0'
    and EVENT_RESOURCE ilike '%accept%'

    union

    select BLOCK_TIMESTAMP,
    EVENT_DATA:price/1e8 as price,
    EVENT_DATA:token:inner as id,
    QueryRunArchived: QueryRun has been archived