0xBlackfishDrift [event] over time
    with
    drift as (
    SELECT
    tx_id,
    block_timestamp
    FROM solana.core.fact_events
    WHERE program_id = 'dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH'
    AND block_timestamp::date >= dateadd('day', -1*{{past_days}}, current_date)
    )

    SELECT *
    FROM solana.core.fact_transactions,
    lateral flatten (LOG_MESSAGES) f
    WHERE
    tx_id IN (SELECT tx_id FROM drift)
    AND block_timestamp::date >= dateadd('day', -1*{{past_days}}, current_date)
    AND f.value IN ('Program log: Instruction: PlacePerpOrder')
    limit 1000

    Run a query to Download Data