Query editor
withbuys as (selecttrader,sum(units_bought) as gno_bought,sum(usd_value) as usd_boughtfromcow_protocol_ethereum.tradeswhere --blockchain in ('ethereum')--,'gnosis')buy_token_address = 0x6810e776880C02933D47DB1b9fc05908e5386b96and block_date > cast('2023-10-01' as date)group by1),sells as (selecttrader,sum(- units_sold) as gno_sold,sum(- usd_value) as usd_soldfromcow_protocol_ethereum.tradeswhere --blockchain in ('ethereum')--,'gnosis')sell_token_address = 0x6810e776880C02933D47DB1b9fc05908e5386b96and block_date > cast('2023-10-01' as date)group by1),cow_bought_mainnet_balance as (selecttrader,sum(gno_bought) as gno_bought,sum(usd_bought) as usd_boughtfrom(select*frombuysunion allselect*fromsells)group by1),buys_gc as (selecttrader,sum(units_bought) as gno_bought,sum(usd_value) as usd_boughtfromcow_protocol_gnosis.tradeswhere --blockchain in ('ethereum')--,'gnosis')buy_token_address = 0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdband block_date > cast('2023-10-01' as date)group by1),