About queries and results
Dune Analytics lets you explore, create, and share Ethereum analytics. You can find an endless amount of great queries and dashboards on Dune.
We have decoded Ethereum smart contract data so you can do powerful analysis with simple SQL queries and visualise the query results into beautiful graphs.
Dune Analytics is free for everyone forever. If you want extra features like private queries, export your results and more check out our Pro plan.
1SELECT 2 time, 3 SUM(volume) as volume, 4 SUM(CASE WHEN source = '1inch' THEN volume ELSE 0 END) as "1inch", 5 SUM(CASE WHEN source = '1split' THEN volume ELSE 0 END) as "1split", 6 (CASE 7 WHEN time::timestamp + '1 month'::interval > NOW() 8 THEN DATE_PART('days', time + '1 MONTH'::INTERVAL - '1 DAY'::INTERVAL)*24 / extract(epoch from (MAX(last_time)::timestamp - time::timestamp)/3600) - 1 9 ELSE 0 10 END) * SUM(volume) as predicted 11FROM ( 12SELECT 13 date_trunc('month', block_time) AS time, 14 source, 15 MAX(block_time) AS last_time, 16 SUM(GREATEST(from_usd, to_usd)) as volume 17 FROM ( 18 SELECT '1inch' as source, to_token, from_token, to_amount, from_amount, tx_hash, block_time, from_usd, to_usd FROM oneinch.view_swaps UNION ALL 19 SELECT '1split' as source, to_token, from_token, to_amount, from_amount, tx_hash, block_time, from_usd, to_usd FROM onesplit.view_swaps 20 WHERE tx_hash NOT IN (SELECT tx_hash FROM oneinch.view_swaps) 21 ) oi 22 GROUP BY 1, 2 23) zzz 24GROUP BY 1 25ORDER BY 1 DESC...