Query editor
-- Monthly Activity tab.-- net_selling = direct sells + exchange deposits + confirmed/potential OTC outflows-- - direct buys - exchange/confirmed/potential-OTC returns.-- net_transfers = unknown outflows - external inflows. Confirmed and potential OTC-- are excluded because they are sale-classified metrics.WITHbounds AS (SELECTCOALESCE(MIN(event_month) FILTER (WHERE category = 'team_distribution'),DATE '2025-11-01') AS first_month,CAST(DATE_TRUNC('month', CURRENT_DATE) AS DATE) AS current_monthFROM dune.asdfw123453216.result_hype_team_activity_events),months AS (SELECT monthFROM boundsCROSS JOIN UNNEST(SEQUENCE(first_month, current_month, INTERVAL '1' MONTH)) AS x(month)),potential_otc_addresses AS (SELECT LOWER(CONCAT('0x', TO_HEX(address))) AS addressFROM dune.asdfw123453216.dataset_hype_potential_otc_addressesWHERE address <> 0x0000000000000000000000000000000000000000AND CAST(effective_from AS DATE) <= CURRENT_DATEAND (effective_to IS NULL OR CAST(effective_to AS DATE) >= DATE '2025-11-01')),classified_events AS (SELECTe.*,p.address AS direct_potential_otc_address,COALESCE(d.sold_direct_fraction + d.exchange_fraction + d.flowdesk_fraction+ d.potential_otc_fraction,0) AS indirect_sold_fraction,COALESCE(d.staked_fraction, 0) AS indirect_staked_fraction,COALESCE(d.residual_unknown_fraction, 1) AS residual_unknown_fractionFROM dune.asdfw123453216.result_hype_team_activity_events eLEFT JOIN potential_otc_addresses p ON e.counterparty = p.addressLEFT JOIN dune.asdfw123453216.result_hype_unknown_disposition dON e.category = 'unknown_transfer'AND p.address IS NULLAND e.counterparty = d.candidate_address),monthly AS (SELECTe.event_month AS month,SUM(e.amount) FILTER (WHERE e.category = 'team_distribution') AS team_distributions,COALESCE(SUM(CASEWHEN e.category IN ('sold_direct', 'sold_exchange', 'otc_flowdesk')OR (e.category = 'unknown_transfer' AND e.direct_potential_otc_address IS NOT NULL)THEN e.amountWHEN e.category = 'unknown_transfer' THEN e.amount * e.indirect_sold_fraction