anomoneSolana Swaps - Orca vs Jupiter %
    Updated 2022-05-03
    WITH jupiter as (SELECT
    date_trunc('day',BLOCK_TIMESTAMP ) as Day ,
    'Jupiter' as SWAP_PROGRAM ,
    --SWAP_TO_MINT,
    SUM(SWAP_FROM_AMOUNT) as Swapped_SOL
    FROM solana.swaps
    WHERE SUCCEEDED = 'TRUE'
    AND date(BLOCK_TIMESTAMP) >= '2020-01-01'
    AND SWAP_FROM_MINT = 'So11111111111111111111111111111111111111112'
    AND SWAP_TO_MINT <> 'So11111111111111111111111111111111111111112'
    AND SWAP_PROGRAM = 'jupiter aggregator v2'
    GROUP BY Day,SWAP_PROGRAM --, SWAP_TO_MINT

    ),

    Orca as (SELECT
    date_trunc('day',BLOCK_TIMESTAMP ) as Day ,
    'Orca' as SWAP_PROGRAM ,
    --SWAP_TO_MINT,
    SUM(SWAP_FROM_AMOUNT) as Swapped_SOL
    FROM solana.swaps
    WHERE SUCCEEDED = 'TRUE'
    AND date(BLOCK_TIMESTAMP) >= '2020-01-01'
    AND SWAP_FROM_MINT = 'So11111111111111111111111111111111111111112'
    AND SWAP_TO_MINT <> 'So11111111111111111111111111111111111111112'
    AND SWAP_PROGRAM = 'orca'
    GROUP BY Day, SWAP_PROGRAM--, SWAP_TO_MINT
    )

    SELECT * FROM Jupiter
    UNION
    SELECT * FROM Orca