Skip to content
Dune Analytics

@slash125 / writeETH/writeWBTC unique writers (depositors)

SQL query

1WITH count_eth as (SELECT count(DISTINCT(p.account)) AS weth, '1' as id from hegic."HegicETHPool_evt_Provide" p
2LEFT join hegic."HegicETHPool_evt_Withdraw" w on p."account" = w."account"
3WHERE w."account" is NULL),
4
5count_wbtc as (SELECT count(DISTINCT(p.account))as wbtc, '1' as id from hegic."HegicERCPool_evt_Provide" p
6LEFT join hegic."HegicERCPool_evt_Withdraw" w on p."account" = w."account"
7WHERE w."account" is NULL)
8
9SELECT wbtc as "writeWBTC", weth as "writeETH" from count_eth
10join count_wbtc on count_eth.id = count_wbtc.id
11

SQL query results

Loading