boomer77TVL example
    Updated 2021-08-10
    SELECT date, total_deposits_usd, total_withdrawls_usd,
    total_deposits_usd+total_withdrawls_usd as deposits_minus_withdrawl,
    total_deposits_usd - LAG(total_deposits_usd) OVER (ORDER BY date) as change_in_total_deposits_usd,
    -total_withdrawls_usd + LAG(total_withdrawls_usd) OVER (ORDER BY date) as change_in_total_withdrawls_usd
    FROM

    --starter query: Liquidity: USD Volume - Daily
    (WITH liquidity_pool AS (
    SELECT
    tx_id,
    date_trunc('week', block_timestamp) AS date,
    action,
    pool_address,
    pool_name,
    token0_address,
    token1_address,
    token0_symbol,
    token1_symbol,
    amount0_adjusted,
    amount1_adjusted,
    amount0_usd,
    amount1_usd,
    (amount0_usd + amount1_usd) AS add_amount_total
    FROM uniswapv3.lp_actions
    ),
    add_liquidity AS (
    SELECT
    date,
    SUM(add_amount_total) AS total_deposit
    FROM liquidity_pool
    WHERE action = 'INCREASE_LIQUIDITY'
    GROUP BY 1
    ),
    remove_liquidity AS (
    SELECT
    date,
    Run a query to Download Data