ZookSOL Swaps on Jupiter - January 1 to February 18, 2022
    Updated 2022-02-19
    with Sol_Swap_Volume_incoming as (
    select
    block_timestamp::date as date,
    sum(swap_from_amount) as Swap_from_SOL_to_Other
    From solana.swaps
    Where block_timestamp::date >= '2022-01-01'
    and block_timestamp::date < '2022-02-19'
    and swap_from_mint = 'So11111111111111111111111111111111111111112' -- SOL token address -- Token being swapped from
    and succeeded = 'TRUE'
    --and swap_program = 'jupiter aggregator v2'
    Group by date
    Order by date desc)
    ,

    Sol_Swap_Volume_outgoing as (
    select
    block_timestamp::date as date,
    sum(swap_to_amount) as Swap_from_Other_to_SOL -- currency = SOL because I used swap_to_mint = 'SOL Address'
    From solana.swaps
    Where block_timestamp::date >= '2022-01-01'
    and block_timestamp::date < '2022-02-19'
    and swap_to_mint = 'So11111111111111111111111111111111111111112' -- SOL token address
    and succeeded = 'TRUE'
    and swap_program = 'jupiter aggregator v2' -- this filter is optional. Solana.swaps currently includes data from Jupiter only. So this filter is redundant and optional.
    Group by date
    Order by date desc)

    Select
    Sol_Swap_Volume_incoming.date,
    Sol_Swap_Volume_incoming.Swap_from_SOL_to_Other,
    Sol_Swap_Volume_outgoing.Swap_from_Other_to_SOL
    from Sol_Swap_Volume_incoming left join Sol_Swap_Volume_outgoing
    on Sol_Swap_Volume_incoming.date = Sol_Swap_Volume_outgoing.date


    Run a query to Download Data