Query editor
SELECTCOUNT(address) AS NumberOfMinersStarted,COUNT(DISTINCT address) AS NumberOfUniqueMiners,format_number(SUM(mintCost)/power(10, 18)) AS totalMinerCostInEthFROM(SELECTdate_trunc('minute', block_time AT TIME ZONE 'UTC') AS block_time,SUBSTRING(topic1 FROM 13 FOR 20) AS address,varbinary_to_uint256(SUBSTRING(data FROM 1 FOR 32)) AS power,varbinary_to_uint256(SUBSTRING(data FROM 33 FOR 32)) AS term,date_add('day', CAST(varbinary_to_uint256(SUBSTRING(data FROM 33 FOR 32)) AS bigint), date_trunc('minute', block_time AT TIME ZONE 'UTC')) AS termEnd,date_add('day', CAST(varbinary_to_uint256(SUBSTRING(data FROM 33 FOR 32)) AS bigint), date_trunc('day', block_time AT TIME ZONE 'UTC')) AS termEndDay,date_diff('day', DATE '2023-10-28', date_trunc('hour', block_time AT TIME ZONE 'UTC')) + 1 AS DayOfMinerStarted,varbinary_to_uint256(SUBSTRING(data FROM 65 FOR 32)) / power(10, 18) AS mintableTitan,varbinary_to_uint256(SUBSTRING(data FROM 97 FOR 32)) AS mintStartTs,varbinary_to_uint256(SUBSTRING(data FROM 129 FOR 32)) AS maturityTs,varbinary_to_uint256(SUBSTRING(data FROM 161 FOR 32)) AS mintPowerBonus,varbinary_to_uint256(SUBSTRING(data FROM 193 FOR 32)) AS EAABonus,varbinary_to_uint256(SUBSTRING(data FROM 225 FOR 32)) AS mintedTitan,varbinary_to_uint256(SUBSTRING(data FROM 257 FOR 32)) AS mintCost,varbinary_to_uint256(SUBSTRING(data FROM 289 FOR 32)) AS status,data,tx_hash,block_hashFROMethereum.logsWHEREcontract_address = 0xf19308f923582a6f7c465e5ce7a9dc1bec6665b1AND topic0 = 0x2109b8587b0ddbd9adf8ec24ce76bef548f2aee7aac34bc6aa0bb51b7cba9d67) AS derived_table