Query editor
WITH positions_90plus AS (SELECTp.question_id,p.market_question,p.market_end_time,date_diff('day', current_date, from_iso8601_timestamp(p.market_end_time)) AS days_to_resolve,SUM(p.balance) AS open_interest_usd,COUNT(DISTINCT p.address) AS unique_holdersFROM polymarket_polygon.positions pWHERE p.day >= current_date - INTERVAL '1' DAYAND p.active = 'True'AND p.closed = 'False'AND p.balance > 0AND p.market_end_time IS NOT NULLAND date_diff('day', current_date, from_iso8601_timestamp(p.market_end_time)) >= 90GROUP BY 1, 2, 3)SELECTmarket_question,days_to_resolve,open_interest_usd,unique_holdersFROM positions_90plusORDER BY open_interest_usd DESCLIMIT 30