CryptoLionWeekly Swap Volume
    Updated 2023-03-27
    SELECT
    date_trunc('week',block_timestamp) as week,
    SUM(abs(amount0_usd)) as swap_volume,
    count(sender) as swaps,
    LAG(swap_volume) IGNORE NULLS OVER (ORDER BY week) as swap_volume_last,
    LAG(swaps) IGNORE NULLS OVER (ORDER BY week) as swaps_last,
    swap_volume - swap_volume_last as change_volume,
    swaps - swaps_last as change_swaps
    FROM uniswapv3.swaps
    WHERE block_timestamp >= getdate() - interval '10 weeks'
    AND sender IS NOT NULL
    AND amount0_usd IS NOT NULL
    GROUP BY 1
    ORDER BY 1
    Run a query to Download Data