Query editor
-- V2 Query: https://dune.com/queries/1747077?d=11CREATE OR REPLACE VIEWdune_user_generated.cow_protocol_virtual_token_options (claim_type, claim_name)AS (SELECT * FROM (VALUES(0, 'Airdrop'),(1, 'GNOOption'),(2, 'ETHOption'),(3, 'Investor'),(4, 'Team'),(5, 'Advisor')) as _);withraw_results as (selectconcat('0x', encode(claimant, 'hex')) as claimant,-- "claimableAmount" / 10^18,"claimedAmount" as claimed_amount,"claimType"from cow_protocol."CowProtocolVirtualToken_evt_Claimed"),claimed_totals as (select"claimType",sum(claimed_amount) / 10^18 as total_claimed,count(*) as num_claimsfrom raw_resultsgroup by "claimType")selectclaim_name,total_claimed,casewhen "claimType" = 0 then 36621120.35222678 - total_claimedwhen "claimType" = 1 then 6677523.534831783 - total_claimedwhen "claimType" = 2 then 29415898.617511522 - total_claimedend as unclaimed,num_claimsfrom claimed_totalsjoin dune_user_generated.cow_protocol_virtual_token_optionson "claimType" = claim_type