MahrooUntitled Query
    Updated 2022-09-19
    with ethCte as
    (select distinct contract_address
    from ethereum.core.fact_event_logs
    where origin_function_signature = '0xfa18022c' -- prepareMiso
    and event_name = 'AuctionWalletUpdated'
    order by contract_address),
    eth_tx as
    ( select *
    from ethereum.core.fact_event_logs
    where ( (origin_function_signature = '0xdc97e082' and event_name = 'Transfer') or
    (origin_function_signature = '0x29762960' and event_name = 'AddedCommitment' ))
    and origin_to_address in (select contract_address from ethCte)),
    bscCte as
    (select distinct contract_address
    from bsc.core.fact_event_logs
    where origin_function_signature = '0xfa18022c' -- prepareMiso
    and event_name = 'AuctionWalletUpdated'
    order by contract_address),

    bsc_tx as
    (select *
    from bsc.core.fact_event_logs
    where ((origin_function_signature = '0xdc97e082' and event_name = 'Transfer') or
    (origin_function_signature = '0x29762960' and event_name = 'AddedCommitment'))
    and origin_to_address in (select contract_address from bscCte)),
    polyCte as
    (select distinct contract_address
    from polygon.core.fact_event_logs
    where origin_function_signature = '0xfa18022c' -- prepareMiso
    and event_name = 'AuctionWalletUpdated'
    order by contract_address),
    poly_tx as
    Run a query to Download Data