Query editor
with frax_supply as (selectday,sum(balance) as balance,sum(change) as changefrom dune_user_generated.frax_daily_balance_per_addressgroup by day/**selectb.day,sum(amount) as balancefromerc20."view_token_balances_daily" b--left outer join other_wallets w-- on b.wallet_address = w.addresswhereamount > 0and b.token_address = '\x853d955acef822db058eb8505911ed77f175b99e'and b.wallet_address != '\x0000000000000000000000000000000000000000'and b.wallet_address != '\x000000000000000000000000000000000000dead'group by b.dayorder by b.day*/),circulating_supply AS (SELECT-- wallet_nameday,sum(balance) as balanceFROM dune_user_generated.frax_fxs_supplyWHERE is_circulating IS TRUEGROUP BY DAY),price as (selectdate_trunc('day', minute) as day,avg(price) as pricefrom prices.usdWHERE symbol = 'FXS'GROUP BY 1ORDER BY 1)selectp.day as day,c.balance as fxs_circulating_supply,f.balance as frax_supply,c.balance * p.price as market_cap,c.balance * p.price / f.balance as fxs_mc_frax_ratiofromprice p inner join circulating_supply con p.day = c.dayinner join frax_supply fon p.day = f.day