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),USDPrice AS (SELECTCAST(minute AS DATE) AS AsOfDate,AVG(price) AS priceFROM prices.usdWHERE symbol='ETH'AND contract_address IS NULLGROUP BY 1),MintClaim AS (SELECTuser,COUNT(1) AS MintClaimCT,SUM(rewardMinted/power(10,18)) AS MintClaimAMTFROM titanx_v2_ethereum.TITANX_evt_MintClaimedGROUP BY user),AggregatedSupply AS (SELECTDATE(ms.maturityTs) AS FutureMintDate,SUM(ms.mintableTitan) AS dailySupplyFROM MintStarted msWHERE DATE(ms.maturityTs) >= CURRENT_DATE ANDDATE(ms.maturityTs) < CURRENT_DATE + INTERVAL '280' DAY -- Updated interval hereGROUP BY DATE(ms.maturityTs)),ColoredSupply AS (SELECTFutureMintDate,dailySupply,ROW_NUMBER() OVER (ORDER BY FutureMintDate) AS ColorGroup -- This assigns a unique number for each dateFROMAggregatedSupply)SELECTFutureMintDate AS ForecastDate,dailySupply AS ForecastedDailySupply,