Query editor
WITH gem AS(SELECTdate_trunc('day', e.block_time) as day,sum("gas_used") * avg("gas_price") / 1e18 AS "gem avg gas"FROM ethereum.transactions e-- INNER JOIN ethereum."transactions" e ON d."tx_hash" = e."hash"WHERE(e.to = '\x83C8F28c26bF6aaca652Df1DbBE0e1b56F8baBa2'OR e.to = '\x0000000035634B55f3D99B071B5A354f48e10BEF'OR e.to = '\x00000000A50BB64b4BbEcEB18715748DfacE08af'OR e.to = '\xf24629fbb477e10f2cf331c2b7452d8596b5c7a5'OR e.to = '\x0000000031f7382a812c64b604da4fc520afef4b')AND e.success = 'true'-- AND .block_time > now() - interval '1 week'AND e.block_time > now() - interval '2 weeks'GROUP BY Day),genie1 AS(SELECTdate_trunc('day', block_time) as day,sum("gas_used") * avg("gas_price") / 1e18 AS "genie avg gas"FROM ethereum.transactions e-- INNER JOIN ethereum."transactions" e ON d."tx_hash" = e."hash"WHEREe.to = '\x0a267cf51ef038fc00e71801f5a524aec06e4f07'AND success = 'true'-- AND .block_time > now() - interval '1 week'AND block_time > now() - interval '2 weeks'GROUP BY day),-- genietx as-- (SELECT-- date_trunc('day', e.block_time) as day,-- sum(t.sub_traces) as "genie txs"-- FROM ethereum.transactions e-- INNER JOIN ethereum."traces" t on e."hash" = t."tx_hash"-- WHERE-- e.to = '\x0a267cf51ef038fc00e71801f5a524aec06e4f07'-- AND e.success = 'true'-- AND e.block_time > now() - interval '2 weeks'-- GROUP BY day-- ),genietx as(SELECTdate_trunc('day', block_time) as day,sum(round(LENGTH(data) / 2500, 2)) AS "genie txs"FROM ethereum.transactions e-- INNER JOIN ethereum."transactions" e ON d."tx_hash" = e."hash"WHEREe.to = '\x0a267cf51ef038fc00e71801f5a524aec06e4f07'AND success = 'true'-- AND .block_time > now() - interval '1 week'AND block_time > now() - interval '2 weeks'AND round(LENGTH(data), 2) >= 1GROUP BY day