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.
1-- -- Tellor Miner Transfers 2with tellor_difficulties as ( 3 SELECT block_time, 4 data, 5 ('x'||SUBSTRING(ENCODE(data, 'hex') from 368 for 16))::bit(64)::bigint as difficulty --('x'||right(encode(SUBSTRING(data from 65 for 64), 'hex'), 64)) as difficulty 6 FROM ethereum."logs" AS logs 7 WHERE DATA IS NOT NULL 8 AND contract_address = '\x0ba45a8b5d5575935b8158a88c631e9f9c95a2e5' 9 AND topic1 = '\x1d85ce10456e29b67de37887496d3f1fcf1b64c79c4d07484038703a9f5c1408' 10 --AND block_time > NOW() - INTERVAL '180 days' 11) 12 13SELECT date_trunc('day', block_time) as day, avg(difficulty) as average_daily_difficulty 14from tellor_difficulties 15group by 1 16order by 1 DESC 17