SalehNear Intents-sweat-date
    Updated 2025-05-26
    with lst_contracts as (
    select
    address
    ,address_name
    ,project_name
    from near.core.dim_address_labels
    where project_name='sweat' --only game
    )
    ,lst_users as (
    select
    distinct tx_signer as user
    from near.core.fact_transactions
    -- where year(block_timestamp)='2025'
    where tx_receiver in (select address from lst_contracts)
    and tx_succeeded
    )
    , lst_sol_price as (
    select
    hour::date as sol_price_date
    ,avg(price) as Sol_Price
    from solana.price.ez_prices_hourly
    where token_address = 'So11111111111111111111111111111111111111112'
    group by 1
    )
    ,lst_eth_price as (
    select
    hour::date as eth_price_date
    ,avg(price) as ETH_Price
    from ethereum.price.ez_prices_hourly
    where SYMBOL ilike 'ETH'
    and NAME = 'ethereum'
    group by 1
    )
    ,lst_near_price as (
    select
    hour::date as near_price_date
    QueryRunArchived: QueryRun has been archived