Elprognerd0 - number of swap platforms
    Updated 2023-04-05
    with token_price as (select
    symbol,
    date_trunc('day', TIMESTAMP) AS DATE,
    avg(PRICE_USD) as price
    from near.core.fact_prices
    GROUP BY 1, 2
    ORDER BY 2),
    t1 as (SELECT
    TX_HASH,
    BLOCK_TIMESTAMP,
    TRADER,
    PLATFORM,
    TOKEN_IN,
    AMOUNT_IN*y.price as usd_price
    from near.core.ez_dex_swaps x join token_price y on x.BLOCK_TIMESTAMP::date = y.DATE AND x.TOKEN_IN = y.symbol
    )

    SELECT
    COUNT(DISTINCT platform) as "Total Number of Platforms"
    from t1
    where PLATFORM is not NULL

    Run a query to Download Data