tkvresearchrelieved-blush
    Updated 2024-09-18
    with full_table as
    (select
    date(BLOCK_TIMESTAMP) as datetime,
    TX_HASH,
    DECODED_LOG:fee as fee,
    DECODED_LOG:maker as maker,
    DECODED_LOG:makerAmountFilled as makerAmountFilled,
    DECODED_LOG:makerAssetId as makerAssetId,
    DECODED_LOG:orderHash as orderHash,
    DECODED_LOG:taker as taker,
    DECODED_LOG:takerAmountFilled as takerAmountFilled,
    DECODED_LOG:takerAssetId as takerAssetId
    from polygon.core.ez_decoded_event_logs
    where
    CONTRACT_ADDRESS in ('0x4bfb41d5b3570defd03c39a9a4d8de6bd8b8982e', '0xc5d563a36ae78145c45a50134d48a1215220f80a')
    and
    EVENT_NAME = 'OrderFilled'
    and
    tx_status = 'SUCCESS')
    ,

    list_topic as
    (select datetime,
    tx_hash,
    maker as address,
    makerAssetId as topic
    from full_table
    union all
    select datetime,
    tx_hash,
    taker,
    takerAssetId as topic
    from full_table),

    total_data as
    (select b.datetime,
    Last run: about 1 month ago
    QUESTION
    USER_CNT
    TOTAL_VOL
    1
    Bournemouth wins the Premier League?52383 78,891,949
    1
    65B
    310s