Afonso_Diaztotal supported assets
    Updated 2024-10-16
    with

    pricet as (
    select
    hour::date as date,
    symbol,
    token_address,
    avg(price) as price_usd
    from
    kaia.price.ez_prices_hourly
    group by 1, 2, 3
    ),

    main as (
    select
    tx_hash,
    block_timestamp,
    origin_from_address as user,
    symbol_in,
    symbol_out,
    token_in,
    token_out
    from
    kaia.defi.ez_dex_swaps
    left join
    pricet s1 on block_timestamp::date = s1.date and s1.token_address = token_in
    left join
    pricet s2 on block_timestamp::date = s2.date and s2.token_address = token_out
    where
    platform = 'capybara'
    )

    select count(distinct token_address) as tokens_count from (
    select
    distinct token_in as token_address from main

    QueryRunArchived: QueryRun has been archived