Query editor
SELECT '10' as source, approx_percentile(amount_usd, 0.1) as tenFROM dex.tradesWHERE block_date > date('2023-5-01')AND blockchain = 'ethereum'AND project = 'uniswap'AND amount_usd>0AND token_pair IS NOT NULLAND tx_to in (0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D,--eth router020xf164fC0Ec4E93095b804a4795bBe1e041497b92a, --eth router010xE592427A0AEce92De3Edee1F18E0157C05861564, --eth v3 router0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45)GROUP BY 1UNIONSELECT '20' as source, approx_percentile(amount_usd, 0.2) as twentyFROM dex.tradesWHERE block_date > date('2023-5-01')AND blockchain = 'ethereum'AND project = 'uniswap'AND amount_usd>0AND token_pair IS NOT NULLAND tx_to in (0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D,--eth router020xf164fC0Ec4E93095b804a4795bBe1e041497b92a, --eth router010xE592427A0AEce92De3Edee1F18E0157C05861564, --eth v3 router0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45)GROUP BY 1UNIONSELECT '30' as source, approx_percentile(amount_usd, 0.3) as thirtyFROM dex.tradesWHERE block_date > date('2023-5-01')AND blockchain = 'ethereum'AND project = 'uniswap'AND amount_usd>0AND token_pair IS NOT NULLAND tx_to in (0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D,--eth router020xf164fC0Ec4E93095b804a4795bBe1e041497b92a, --eth router010xE592427A0AEce92De3Edee1F18E0157C05861564, --eth v3 router0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45)GROUP BY 1UNIONSELECT '40' as source, approx_percentile(amount_usd, 0.4) as fourtyFROM dex.tradesWHERE block_date > date('2023-5-01')AND blockchain = 'ethereum'AND project = 'uniswap'AND amount_usd>0AND token_pair IS NOT NULLAND tx_to in (0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D,--eth router020xf164fC0Ec4E93095b804a4795bBe1e041497b92a, --eth router010xE592427A0AEce92De3Edee1F18E0157C05861564, --eth v3 router0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45)