theericstoneuser profiles
    -- let's use tags and labels to understand
    -- who is engaging with particular contract
    -- first let's find addresses that have
    -- used a contract of interest
    -- join with labels to find any known protocols
    -- or contracts that are directly engaging
    with
    users as (
    select
    origin_from_address as address,
    labs.address_name,
    labs.label,
    sum(amount_out) as total_bought,
    count(distinct (tx_hash)) as n_buys
    from
    ethereum.core.ez_dex_swaps swaps
    left join ethereum.core.dim_labels labs on swaps.origin_from_address = labs.address
    where
    token_out = lower('{{tokenaddress}}')
    and block_timestamp > current_date - {{daysago}}
    group by
    1,
    2,
    3
    having
    total_bought > {{minbought}}
    ),

    -- now we will pick a few tags that we find relevant
    -- for our present analysis
    -- you can find other tags in our docs
    -- here: https://docs.flipsidecrypto.com/our-data/featured-tags-and-sql-examples
    tagrank as (
    select distinct
    address,
    first_value(tag_name) over (
    Run a query to Download Data