KaskoazulSOL Swaps
    Updated 2022-02-21
    WITH SWAPPEDAWAY AS (
    select
    block_timestamp::date as date,
    sum(swap_from_amount) as SwappedAwaySOL
    From solana.swaps
    Where block_timestamp::date >= '2022-01-01'
    AND succeeded = 'TRUE'
    AND swap_program = 'jupiter aggregator v2'
    AND swap_from_mint = 'So11111111111111111111111111111111111111112' -- wrapped SOL
    Group by date
    ),
    SWAPPEDTO AS (
    select
    block_timestamp::date as date,
    sum(swap_to_amount) as SwappedToSOL
    From solana.swaps
    Where block_timestamp::date >= '2022-01-01'
    AND succeeded = 'TRUE'
    AND swap_program = 'jupiter aggregator v2'
    AND swap_to_mint = 'So11111111111111111111111111111111111111112' -- wrapped SOL
    Group by date
    )

    SELECT
    a.date,
    a.SwappedAwaySOL,
    t.SwappedToSOL
    FROM
    SWAPPEDAWAY a
    INNER JOIN SWAPPEDTO t
    ON a.date = t.date


    Run a query to Download Data