with ZRX as (
select
date_trunc('day', block_timestamp) as date,
sum (AMOUNT_IN_USD) as "amount of usd swap to ZRX"
from ethereum.core.ez_dex_swaps
WHERE SYMBOL_IN = 'ZRX'
and BLOCK_TIMESTAMP >= '2022-01-01'
GROUP by 1
order by 1 DESC
),
total as (
select
date_trunc('day', block_timestamp) as date,
sum (AMOUNT_IN_USD) as "amount of usd swap to total"
from ethereum.core.ez_dex_swaps
-- WHERE SYMBOL_IN = 'ZRX'
where BLOCK_TIMESTAMP >= '2022-01-01'
GROUP by 1
order by 1 DESC
)
select 'total' as blockchain,* from total
UNION
select 'ZRX' as blockchain,* from ZRX