Popex404Top 10 addresses after bridge
    Updated 2022-08-01
    with A as (select block_timestamp, to_address as user
    from polygon.core.fact_token_transfers A
    where tx_hash in (select tx_hash
    from polygon.core.fact_event_logs
    where ORIGIN_FROM_ADDRESS ilike '0x0000000000000000000000000000000000000000'
    and ORIGIN_TO_ADDRESS ilike '0x0000000000000000000000000000000000000000'
    and event_name ilike 'transfer')
    ),
    first_transfer as (
    SELECT ft.block_timestamp,
    ft.tx_hash,
    ft.origin_from_address as wallet,
    ft.origin_to_address as destination,
    row_number() over (partition by ft.origin_from_address order by ft.block_timestamp) as rank
    From polygon.core.fact_event_logs ft
    WHERE EXISTS (select 1 from A where ft.block_timestamp>A.block_timestamp and A.user = ft.origin_from_address)
    QUALIFY rank = 1
    ),
    joined as (
    SELECT
    A.block_timestamp as bridge_time,
    ft.block_timestamp as ft_time,
    A.user,
    ft.destination as first_destination
    from A inner join first_transfer ft on a.user=ft.wallet
    )
    SELECT
    date_trunc(day,bridge_time) as date,
    first_destination,
    M.address_name,
    M.label_type,
    M.project_name,
    count(*) as txns
    from joined
    join polygon.core.dim_labels M on joined.first_destination = M.address
    where first_destination in ('0x7ceb23fd6bc0add59e62ac25578270cff1b9f619', '0x1a1ec25dc08e98e5e93f1104b5e5cdd298707d31', '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', '0xa5e0829caced8ffdd4de3c43696c57f7d7a678ff',
    Run a query to Download Data