amelia-leeUntitled Query
    Updated 2022-07-30
    with bridges as (
    select block_timestamp,origin_from_address from ethereum.core.fact_event_logs
    where origin_to_address in ('0x401f6c983ea34274ec46f84d70b31c151321188b','0xa0c68c638235ee32657e8f720a23cec1bfc77c77','0x40ec5b33f54e0e8a33a975908c5ba1c14e5bbbdf','0x8484ef722627bf18ca5ae6bcf031c23e6e922b30')
    and origin_function_signature in ('0xe3dec8fb','0x4faa8a26','0x8b9e4f93')
    and block_timestamp > '2022-06-06 15:14:51.000'),

    table1 as (
    select t1.origin_from_address as User1,
    t1.tx_hash,
    t1.origin_to_address,
    min (t1.block_timestamp) as mindate
    from polygon.core.fact_event_logs t1 join bridges t2 on t1.origin_from_address = t2.origin_from_address
    where t1.block_timestamp > t2.block_timestamp
    group by 1,2,3)
    select address_name,
    count (distinct tx_hash),
    count (distinct user1)
    from table1 t1 join polygon.core.dim_labels t3 on t1.origin_to_address = t3.address
    group by 1
    order by 3 DESC
    limit 15

    -- alik110
    Run a query to Download Data