Query editor
With Dex as (Select DATE_TRUNC('week', block_time) as day,Sum(amount_usd) as USD, Sum(cast(token_bought_amount_raw as double))/1e18 as bought, sum(cast(token_sold_amount_raw as double))/1e18 as sold,tx_from,token_sold_address,token_bought_addressfrom dex.tradeswhere (tx_from = 0x6fbe7bb3a638dfedc38d64d1afc2765200d56e98or tx_from = 0xdde336dc9e3f6a7defcba9e4bde80ae0d08f843dor tx_from = 0xfe6e781621741b4735c6f61199057d2a96f9c43bor tx_from = 0xeeed1c37d46849a9ed2fed2c7147782caa1b0520or tx_from = 0x74f4eaa11794f6fe3615533af83abb696205e4e3or tx_from = 0x44b338e45f159c9f0a9e38cac950d37f70469f2cor tx_from = 0x21d293467dcfbaea148a9f920f36444a313c50f1or tx_from = 0xc5dcb0a22551fba93e260028813f0eef25bffea6or tx_from = 0xb6eb7f83f1d5f7d71cf2c4c6e4abafef6baecff5or tx_from = 0xeb8de19ba60e5efa5f6ba3d4c171a0a6a9da25c9or tx_from = 0xd16306991b92be6de505e8d0d0f655123ee9a821or tx_from = 0x12d26db6116012a44e503d84f06115cea615fa9eor tx_from = 0xa80b1ce7d2660f37e19ef8c4fe88163f38e4566for tx_from = 0x7d2751c1e2c6e1496826fa286ab3b3eeff0fb486or tx_from = 0x9bd8da2f560e65f0a721a2c206d9924fa0c31b14or tx_from = 0xad3c80b5d38c1ca0291495e7c7739823e9854206or tx_from = 0x9ecef9c06523851b997f0ac9cfa95690f103558cor tx_from = 0xba78b0f334c2b0d26793cee873d846945361d994or tx_from = 0x2d5c219527af9f4288f11de4a158855d246240b9or tx_from = 0xc57332bff61db38f3090b184c4ce3fc2235e4778or tx_from = 0x23fcf4a02d8d0ac42436548d3aac81f4701fa9e1or tx_from = 0xafb12c7cfa66d7eb824da1cb55fff64bb6be7c18or tx_from = 0x9d7c09a7aae3e4567e339698bed4eb89402a18a2or tx_from = 0x44496f90aa7a2099b3af451f83d4924f129df66eor tx_from = 0xedb9017b51e3bcddc9f4c7f118532dadf669faa9or tx_from = 0x00fa88872a1cf5e57ce664397b470ae8a7822f84or tx_from = 0x4e0e91f2dfa6f766bd4c5c3e9e98ea13982a684dor tx_from = 0xbc333d28f0f4a3dc35f5b21ab7149335d3ede7fbor tx_from = 0x1e26f75b4a421b9546066902cc0bd9f2b3287673or tx_from = 0x1b7b3ac726f9111f07b413806697a201a333484a)And (token_sold_address = 0xa045e37a0d1dd3a45fefb8803d22457abc0a728aor token_bought_address = 0xa045e37a0d1dd3a45fefb8803d22457abc0a728a)group by 1,tx_from,token_sold_address,token_bought_address)Select Day, Sum(if(token_sold_address = 0xa045e37a0d1dd3a45fefb8803d22457abc0a728a, USD,0)) as GHNYsoldUSD,Sum(if(token_bought_address = 0xa045e37a0d1dd3a45fefb8803d22457abc0a728a, USD,0)) as GHNYboughtUSDFrom dexgroup by 1order by 1 desc