Query editor
with temp as (selectdate_trunc('day', "evt_block_time") as day,sum(value/1e18) as LP_Tokenfrom pancakeswap_v2_bnb.PancakePair_evt_Transferwhere "evt_block_time" > cast('2021-07-01 00:00' as TIMESTAMP)and "from" = 0x0000000000000000000000000000000000000000and "contract_address" = 0x66FDB2eCCfB58cF098eaa419e5EfDe841368e489group by 1union allselectdate_trunc('day', "evt_block_time") as day,- sum(value/1e18) as LP_Tokenfrom pancakeswap_v2_bnb.PancakePair_evt_Transferwhere "evt_block_time" > cast('2021-07-01 00:00' as TIMESTAMP)and "to" = 0x0000000000000000000000000000000000000000and "contract_address" = 0x66FDB2eCCfB58cF098eaa419e5EfDe841368e489group by 1),tempPCSDAIBUSD as (selectdate_trunc('day', "evt_block_time") as day,sum(value/1e18) as LP_PCSDAIBUSDfrom pancakeswap_v2_bnb.PancakePair_evt_Transferwhere "evt_block_time" > cast('2022-07-01 00:00' as TIMESTAMP)and (("to" = 0xa5f8c5dbd5f286960b9d90548680ae5ebff07652and "From" = 0x9F45E2181D365F9057f67153e6D213e2358A5A4B)or ("From" != 0xa5f8c5dbd5f286960b9d90548680ae5ebff07652and "to" = 0x9F45E2181D365F9057f67153e6D213e2358A5A4B))and "contract_address" = 0x66FDB2eCCfB58cF098eaa419e5EfDe841368e489group by 1union allselectdate_trunc('day', "evt_block_time") as day,- sum(value/1e18) as LP_PCSDAIBUSDfrom pancakeswap_v2_bnb.PancakePair_evt_Transferwhere "evt_block_time" > cast('2022-07-01 00:00' as TIMESTAMP)and (("from" = 0xa5f8c5dbd5f286960b9d90548680ae5ebff07652and "to" = 0x9F45E2181D365F9057f67153e6D213e2358A5A4B)or ("to" != 0xa5f8c5dbd5f286960b9d90548680ae5ebff07652and "from" = 0x9F45E2181D365F9057f67153e6D213e2358A5A4B))and "contract_address" = 0x66FDB2eCCfB58cF098eaa419e5EfDe841368e489group by 1),BUSD as (selectdate_trunc('day', "evt_block_time") as day,sum(value/1e18) as BUSDfrom busd_bnb.BEP20BUSD_evt_Transferwhere "evt_block_time" > cast('2021-07-01 00:00' as TIMESTAMP)and"to" = 0x66FDB2eCCfB58cF098eaa419e5EfDe841368e489--and "contract_address" = 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56group by 1