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 WITH prices as ( 2SELECT price from prices.usd 3WHERE symbol = 'WBTC' 4ORDER BY minute DESC 5LIMIT 1), 6 7cre as (SELECT amount, strike/10^8 as "strike", call_tx_hash, "output_optionID", "optionType" FROM hegic."HegicWBTCOptions_call_create" 8WHERE call_success = true 9AND (strike/10^8/ (SELECT price from prices) BETWEEN 0.8 AND 1.2) 10), 11 12exe as ( 13SELECT "optionID" from hegic."HegicWBTCOptions_call_exercise" 14WHERE call_success = true), 15 16cre_exe as ( 17SELECT * from cre c 18LEFT JOIN exe e on c."output_optionID" = e."optionID" 19WHERE e."optionID" IS NULL), 20 21cre_exe_exp as ( 22SELECT * from cre_exe 23LEFT JOIN hegic."HegicWBTCOptions_evt_Expire" exp ON cre_exe."output_optionID" = exp.id 24WHERE exp.id is NULL 25),...