KaskoazulTop10 swap pairs
    Updated 2022-02-27
    WITH SWAPPAIR1 AS (
    SELECT
    l.label as label_to,
    s.swap_to_mint as swap_to,
    s.swap_from_mint as swap_from,
    count(tx_id) as swapCountAway --count(l.label)
    FROM Solana.swaps s
    LEFT OUTER JOIN Solana.labels l
    ON s.swap_to_mint = l.address
    WHERE block_timestamp::date >= '2022-02-01'
    AND succeeded = 'True'
    GROUP BY 1,2,3
    ORDER BY 4 DESC
    LIMIT 10
    ),

    SWAPPAIR AS (
    SELECT
    p1.label_to,
    p1.swap_to,
    l.label as label_from,
    p1.swap_from,
    p1.swapCountAway
    FROM SWAPPAIR1 p1
    LEFT OUTER JOIN Solana.labels l
    ON p1.swap_from = l.address
    )

    SELECT
    CONCAT (label_from,'-',label_to) as swapPair,
    CONCAT (swap_from,'-',swap_to) as addressPair,
    swapCountAway
    FROM
    SWAPPAIR
    ORDER BY 3 DESC

    Run a query to Download Data