2844Raydium Overall
    Updated 2022-07-11
    WITH Raydium AS(
    select
    block_timestamp::date as "DATE", count(TX_ID) as "Raydium TOTAL SWAPS"
    ,COUNT (DISTINCT swapper) AS "Raydium UNIQUE USERS"
    -- ,SUM (swap_from_amount)
    -- ,swap_from_mint
    -- ,swap_to_amount
    -- ,swap_to_mint
    from
    solana.fact_swaps
    where block_timestamp::date >= '2022-01-01'
    AND swap_program in ('raydium v4')
    AND succeeded = TRUE
    AND swap_from_amount > 0
    GROUP BY 1
    ORDER BY 1 DESC),

    SOLANA AS (
    select
    block_timestamp::date as "DATE1",count(TX_ID) as "SOLANA TOTAL SWAPS"
    ,COUNT (DISTINCT SIGNERS[0]) AS "SOLANA UNIQUE USERS"

    from solana.core.fact_transactions
    where block_timestamp::date >= '2022-01-01'
    AND succeeded = TRUE

    GROUP BY 1
    ORDER BY 1 DESC
    )
    SELECT "DATE","Raydium TOTAL SWAPS","Raydium UNIQUE USERS","SOLANA TOTAL SWAPS","SOLANA UNIQUE USERS"
    FROM Raydium,SOLANA
    WHERE "DATE"="DATE1"
    GROUP BY 1,2,3,4,5
    ORDER BY 1
    Run a query to Download Data