Query editor
SELECTposition_token, sum(case when position_side = 'long' then size_usd else null end) as long_open_interest, sum(case when position_side = 'short' then -1*size_usd else null end) as short_open_interest, count(distinct case when position_side = 'long' then owner else null end) as long_traders, count(distinct case when position_side = 'short' then owner else null end) as short_tradersFROM query_3343518WHERE entry_price_usd is not nulland size_usd > 0group by 1