adambalaSOL Swaps on Jupiter
    Updated 2022-02-21
    with
    firsts as (
    select date_trunc('day',block_timestamp) as date , sum(SWAP_FrOM_AMOUNT) as sol_amount,
    count(DISTINCT tx_id) as number_trans,'solana amount to other coins' title
    from solana.swaps
    where block_timestamp between '2022-01-01' and '2022-01-20'
    and swap_to_mint != 'So11111111111111111111111111111111111111112'
    and swap_from_mint ='So11111111111111111111111111111111111111112'
    and SUCCEEDED = 'TRUE'
    group by 1 ,4 ),
    seconds as (
    select date_trunc('day',block_timestamp) as date , sum(swap_to_amount) as amount,
    count(DISTINCT tx_id) as number_trans , 'solana amount from other coins' as title
    from solana.swaps
    where block_timestamp between '2022-01-01' and '2022-01-20'
    and swap_to_mint = 'So11111111111111111111111111111111111111112'
    and swap_from_mint !='So11111111111111111111111111111111111111112'
    and SUCCEEDED = 'TRUE' group by 1,4),
    third as (
    select * from firsts
    union
    select * from seconds)
    select * from third
    Run a query to Download Data