brian-terraUntitled Query
    Updated 2022-07-29
    WITH txns as (select distinct tx_id as txn
    from ethereum.events_emitted
    where contract_address = '0x9d5407c08febe35f3a747da422dc2da45ca30b61'
    and tx_succeeded = 'TRUE'
    and event_name = 'Approval')
    ,
    sales as (
    select block_timestamp,
    tx_id,
    event_inputs:price::float / 1e18 as price
    from ethereum.events_emitted, txns
    where tx_id = txn
    and event_name = 'OrdersMatched'
    )
    --select sum(price) as total_sales from sales
    select * from ethereum.events_emitted where tx_id = '0x844e1c8b3c4c30093facf5dad5db6b2cef82fd8ed1fc43d696d5186748cf6120'
    Run a query to Download Data