Query editor
SELECTDATE_TRUNC('day', b.time) AS day,COUNT(DISTINCT t."from") AS daily_active_addresses,COUNT(DISTINCT CASE WHEN t."to" IN (SELECTaddressFROM ink.contracts) THEN t."from" END) AS contract_users,COUNT(DISTINCT c.address) AS new_contracts,SUM(t.gas_used) AS total_gas_used,COUNT(*) AS total_transactionsFROM ink.blocks AS bLEFT JOIN ink.transactions AS tON b.number = t.block_numberLEFT JOIN ink.contracts AS cON c.created_at BETWEEN DATE_TRUNC('day', b.time) AND DATE_TRUNC('day', b.time) + INTERVAL '1' DAYGROUP BY1ORDER BY1 DESC