Query editor
WITHMintStarted AS (SELECTuser,evt_tx_hash,contract_address,evt_index,evt_block_time,evt_block_number,gMintpower,tRank,CAST(json_extract_scalar(userMintInfo, '$.mintPower') AS UINT256) AS mintPower,CAST(json_extract_scalar(userMintInfo, '$.numOfDays') AS UINT256) AS numOfDays,CAST(json_extract_scalar(userMintInfo, '$.mintableTitan') AS DOUBLE)/power(10,18) AS mintableTitan,from_unixtime(CAST(json_extract_scalar(userMintInfo, '$.mintStartTs') AS DECIMAL)) AS mintStartTs,from_unixtime(CAST(json_extract_scalar(userMintInfo, '$.maturityTs') AS DECIMAL)) AS maturityTs,CAST(json_extract_scalar(userMintInfo, '$.mintPowerBonus') AS UINT256) AS mintPowerBonus,CAST(json_extract_scalar(userMintInfo, '$.EAABonus') AS DOUBLE)/100000 AS EAABonusPCT,CAST(json_extract_scalar(userMintInfo, '$.mintedTitan') AS DOUBLE)/power(10,18) AS mintedTitan,CAST(json_extract_scalar(userMintInfo, '$.mintCost') AS DOUBLE)/power(10,18) AS mintCost,CAST(json_extract_scalar(userMintInfo, '$.status') AS UINT256) AS statusFROM titanx_v2_ethereum.TITANX_evt_MintStarted),TotalMintableSupply AS (SELECTSUM(mintableTitan) AS TotalMintableAtMaxTermFROM MintStartedWHERE date_diff('day', NOW(), maturityTs) < 280 and date_diff('day', NOW(), maturityTs) > 0)SELECTTotalMintableAtMaxTermFROMTotalMintableSupply;