Query editor
Select TX_From,sum(GHNY/1e18) AS GHNY,Sum(Profit) as Profit_usdFrom(select -sum(cast (token_sold_amount_raw as double)) as GHNY,tx_from,Sum(amount_usd) as Profitfrom dex.tradeswhere token_sold_address = 0xa045E37a0D1dd3A45fefb8803D22457abc0A728aGroup by 2union allSelect sum(cast (token_bought_amount_raw as double)) as GHNY,tx_from,-Sum(amount_usd) as Profitfrom dex.tradeswhere token_bought_address = 0xa045E37a0D1dd3A45fefb8803D22457abc0A728aGroup by 2)Group by 1