azerbaijanWeekly Miso users on different chains
    Updated 2022-09-19
    (with eth as (
    select distinct event_inputs:addr::string as contract_auction
    from ethereum.core.fact_event_logs
    where event_name = 'MarketCreated'
    and origin_to_address = '0x7603a35af5cf10b113f167d424eb75bb7062c8ce')
    select
    date_trunc('week', block_timestamp) as week,
    'Ethereum' as chain,
    count (distinct origin_from_address) as users,
    count (distinct tx_hash) as txs
    from ethereum.core.fact_event_logs
    where origin_to_address in (select contract_auction from eth)
    and origin_function_signature in ('0x29762960','0xdc97e082')
    group by 1)
    union all
    (with poly as (
    select distinct event_inputs:addr::string as contract_auction
    from polygon.core.fact_event_logs
    where event_name = 'MarketCreated'
    and origin_to_address = '0xc040f84cf7046409f92d578ef9040fe45e6ef4be')
    select
    date_trunc('week', block_timestamp) as week,
    'Polygon' as chain,
    count (distinct origin_from_address) as users,
    count (distinct tx_hash) as txs
    from polygon.core.fact_event_logs
    where origin_to_address in (select contract_auction from poly)
    and origin_function_signature in ('0x29762960','0xdc97e082')
    group by 1)
    union all
    Run a query to Download Data