Nige7777Daily Swap Volume by Pair
    Updated 2021-06-22
    -- In this query we are aggregating up volume of token_1 (token swapped for) for each swap pair (UST to LUNA) over the last 30 days
    -- To get more granular you can add an additional AND clause to pick a singular swap pair

    SELECT
    date_trunc('day', block_timestamp) as date,
    swap_pair,
    sum(token_1_amount) as volume,
    sum(token_1_amount_usd) as volume_usd
    FROM terra.swaps
    WHERE block_timestamp > current_date - 30
    GROUP BY 1,2
    ORDER BY 1 DESC


    Run a query to Download Data