elvisThor6 - Number of addresses by pool
    Updated 2021-10-28
    /*Distinct number of addresses in swaps in total and by pool, today and daily.
    HINT: Use Liquidity Events*/

    SELECT
    date_trunc('day', block_timestamp) as dt, pool_name, count(distinct from_address) as NumUsers, count(distinct tx_id) as tx_count
    FROM
    thorchain.swap_events
    WHERE
    date_trunc('day', block_timestamp) > CURRENT_DATE - 90
    GROUP BY
    1,2
    ORDER BY 3 DESC
    Run a query to Download Data