Query editor
/* WETHAddress: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 *//* UNICHADAddress: 0x099f8d9e004cE139c6F46572ea99c0DB71889A78 *//* UNICHADDeploymentBlockNumber: 17879163 *//* UNICHADeploymentTimestamp: '2023-08-09 00:00:00.000 UTC' *//* UniswapV2PairAddress: 0x4D66182187AaC4A4b20E02d9A5e063cF5Ca4C3A4 *//* TeamWallet: 0xD87dec8eE5d941234d85a9d2636D077fE03B0660*//* UnibotV2Address: 0xf819d9cb1c2a819fd991781a822de3ca8607c3c9 *//* UniswapV2Router02: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D */WITHwethUSDPrices AS (SELECTminute,price AS wethUSDFROMprices.usdWHEREblockchain = 'ethereum'/* WETHAddress */AND contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/* UNICHADeploymentTimestamp */AND minute >= CAST('2023-08-09 00:00:00.000 UTC' AS TIMESTAMP)ORDER BYminute DESC),tradesWithLiquidity AS (SELECT/*To change the time resolution, adjust the line below, for valid values check the docs:https://dune.com/docs/query/DuneSQL-reference/Functions-and-operators/datetime/?h=date+trunc#truncation-function*/date_trunc('hour', blockTime) AS truncatedBlockTime,priceWETH * wethUSD AS priceUSD,*FROM/* UNICHAD Trades + Liquidity */query_2849883JOIN wethUSDPrices ON date_trunc('minute', blockTime) = wethUSDPrices.minuteORDER BYblockTime DESC),allTimeHigh AS (SELECTblockTime AS allTimeHighTimestamp,priceUSD AS allTimeHighUSD,txHash AS allTimeHighTxHashFROMtradesWithLiquidityORDER BYpriceUSD DESCLIMIT1),rankedTrades AS (SELECTtruncatedBlockTime,priceWETH,priceUSD,ROW_NUMBER() OVER (PARTITION BYtruncatedBlockTime