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.
1with cre as (SELECT amount, call_tx_hash, "output_optionID", "optionType" FROM hegic."HegicWBTCOptions_call_create" 2WHERE call_success = true), 3 4exe as ( 5SELECT "optionID" from hegic."HegicWBTCOptions_call_exercise" 6WHERE call_success = true), 7 8cre_exe as ( 9SELECT * from cre c 10LEFT JOIN exe e on c."output_optionID" = e."optionID" 11WHERE e."optionID" IS NULL), 12 13cre_exe_exp as ( 14SELECT * from cre_exe 15LEFT JOIN hegic."HegicWBTCOptions_evt_Expire" exp ON cre_exe."output_optionID" = exp.id 16WHERE exp.id is NULL), 17 18cas as (select "optionType", sum(amount/10^8) as "# Contracts" 19from cre_exe_exp 20GROUP BY "optionType") 21 22SELECT "# Contracts", 23CASE 24WHEN "optionType" = 1 THEN 'put' 25ELSE 'call'...