Query editor
-- This query has been migrated to run on DuneSQL.-- If you need to change back because you’re seeing issues, use the Query History view to restore the previous version.-- If you notice a regression, please email [email protected].SELECTssq.time,new_users AS new,(unique_users - new_users) AS old /* (SELECT price from prices.layer1_usd WHERE symbol = 'ETH' and minute = ssq.time LIMIT 1) as eth_price */FROM(SELECTsq.time,COUNT(*) AS new_usersFROM(SELECTtx_from AS user,MIN(DATE_TRUNC('day', oi.block_time)) AS timeFROMdex_aggregator.trades AS oiWHEREoi.blockchain = 'ethereum'AND project = '1inch'GROUP BY1ORDER BY1) AS sqGROUP BY1) AS ssqLEFT JOIN (SELECTDATE_TRUNC('day', oi.block_time) AS time,COUNT(DISTINCT tx_from) AS unique_usersFROMdex_aggregator.trades AS oiWHEREoi.blockchain = 'ethereum'AND project = '1inch'GROUP BY1ORDER BY1) AS t2 ON t2.time = ssq.timeORDER BY1 DESC NULLS FIRST