Query editor
1WITH unions AS (2 SELECT3 COUNT(DISTINCT maker) AS buyer4 FROM dex.trades5 UNION6 SELECT7 COUNT(DISTINCT taker) AS buyer8 FROM dex.trades9)10SELECT11 SUM(DISTINCT buyer) AS total12FROM unions
WITH unions AS (
SELECT
COUNT(DISTINCT maker) AS buyer
FROM dex.trades
UNION
COUNT(DISTINCT taker) AS buyer
)
SUM(DISTINCT buyer) AS total
FROM unions