Query editor
-- V2 Query: https://dune.com/queries/1746977?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,casewhen claimant = '\xca07EaA4253638D286caD71CBcEec11803F2709A' then 'Future Team'when claimant = '\x0da0c3e52c977ed3cbc641ff02dd271c3ed55afe' then 'GnosisDAO'when claimant = '\x849d52316331967b6ff1198e5e32a0eb168d039d' then 'GnosisDAO'else claim_nameend as claim_namefrom cow_protocol."CowProtocolVirtualToken_evt_Claimed"join dune_user_generated.cow_protocol_virtual_token_optionson "claimType" = claim_type),claimed_totals as (selectclaim_name,sum(claimed_amount) / 10^18 as total_claimed,count(*) as num_claimsfrom raw_resultsgroup by claim_name)selectclaim_name,total_claimed,casewhen claim_name = 'Airdrop' then 63378879.64777322 - total_claimedwhen claim_name = 'GNOOption' then 43322476.465168215 - total_claimedwhen claim_name = 'ETHOption' then 21917434.715821814 - total_claimedwhen claim_name = 'Investor' then 100 * 10^6 - total_claimedwhen claim_name = 'Team' then 99255952.38 - total_claimedwhen claim_name = 'Future Team' then 50744047.62 - total_claimedwhen claim_name = 'Advisor' then 5333333.33333333 - total_claimedwhen claim_name = 'GnosisDAO' then 100 * 10^6 - total_claimedend as unclaimed,num_claims,casewhen claim_name = 'Airdrop' then 1379 - num_claimswhen claim_name = 'GNOOption' then 594 - num_claimswhen claim_name = 'ETHOption' then 889 - num_claimswhen claim_name = 'Investor' then 57 - num_claimswhen claim_name = 'Team' then 22 - num_claims