Sbhn_NPTop 10 Most Popular $DAI Swap Pairs by Swap volume
    Updated 2023-03-03
    SELECT
    case when
    LOWER(SYMBOL_in)>LOWER(SYMBOL_OUT)
    then concat(SYMBOL_OUT,'/',SYMBOL_in)
    else
    concat(SYMBOL_in,'/',SYMBOL_OUT)
    end AS pair,
    count(DISTINCT tx_hash) as txs,
    sum(amount_out_usd) as volume,
    row_number() over (order by volume desc) as roww
    FROM ethereum.core.ez_dex_swaps
    WHERE symbol_in LIKE 'DAI'
    OR symbol_out LIKE 'DAI'
    GROUP BY 1
    having volume >0
    order by 3 DESC
    limit 10
    Run a query to Download Data