Query editor
WITHparams AS (SELECT0xa8a30e0dafca4156f28d96cca5671a0eeca5e407 AS contract_address,4500000 AS total_tipping_allocation,10000 AS max_tipping_allocation_per_wallet),vault_data as (SELECT(block_day - INTERVAL '1' DAY) as block_day,total_supply,COUNT(wallets) as unique_wallets,COUNT(case tip_allowance when 10000 then 1 else null end) as users_with_max_allowanceFROMquery_3904006GROUP BYblock_day,total_supply),degen_price as (SELECTpriceFROMquery_3558896)SELECTblock_day,total_supply,ROUND((total_supply*params.max_tipping_allocation_per_wallet/params.total_tipping_allocation), 0) AS amount_for_max_allo,ROUND((total_supply * price), 0) AS vault_usd,ROUND((total_supply*params.max_tipping_allocation_per_wallet/params.total_tipping_allocation * price), 0) AS amount_for_max_allo_usd,unique_wallets,users_with_max_allowance,(params.max_tipping_allocation_per_wallet * 365 / ROUND((total_supply*params.max_tipping_allocation_per_wallet/params.total_tipping_allocation), 0)) as APTY,(params.max_tipping_allocation_per_wallet * 365 / ROUND((total_supply*params.max_tipping_allocation_per_wallet/params.total_tipping_allocation), 0) * 100) as APTYx100FROMvault_dataCROSS JOIN degen_priceCROSS JOIN paramsORDER BYblock_day DESC;