theericstone2022-12-16 03:21 PM
    Updated 2022-12-22
    select distinct address,
    first_value(tag_name) over (partition by address order by weight desc) as tag_name from (
    select
    address,
    tag_name,
    case
    when tag_name = 'wallet millionaire' then 5
    when tag_name = 'nft transactor top 10%' then 4
    when tag_name = 'ftx user' then 3
    else 0
    end as weight
    from
    crosschain.core.address_tags
    where
    creator = 'flipside'
    and blockchain = 'ethereum'
    and (
    end_date IS NULL
    or end_date > current_date - 31
    )
    and tag_name in (
    'wallet millionaire',
    'nft transactor top 10%',
    'ftx user'
    )
    )
    Run a query to Download Data