Query editor
/** [Title] VWASD Trend, Daily Whale Exits & TON Price** [Description]* This query combines:* 1. 30-day rolling trend of VWASD (Blue Line)* 2. Daily Exit Amount (Bar Chart)* 3. Daily Specific VWASD (Data Point)* 4. TON Daily Price (Green Line) - NEW!** [Correlation Analysis]* - Check if 'Daily_Exit_Amount' spikes when 'TON_Price' drops (Panic Sell).* - Check if 'Daily_Exit_Amount' spikes when 'TON_Price' rises (Profit Taking).*/WITH deposits AS (SELECTdepositor,evt_block_time,CAST(amount AS DOUBLE) / 1e27 AS amountFROM ton_staking_ethereum.DepositManager_evt_Deposited),withdrawals AS (SELECTdepositor,evt_block_time,CAST(amount AS DOUBLE) / 1e27 AS amountFROM ton_staking_ethereum.DepositManager_evt_WithdrawalRequested),first_stake AS (SELECTdepositor,MIN(evt_block_time) AS first_stake_timeFROM depositsGROUP BY depositor),range_bounds AS (SELECTCAST(MIN(DATE(evt_block_time)) AS DATE) as start_date,CURRENT_DATE as end_dateFROM withdrawals),date_series AS (SELECT dtFROM range_bounds,UNNEST(SEQUENCE(start_date, end_date, INTERVAL '1' DAY)) AS t(dt)),-- [추가] TON 가격 데이터 가져오기ton_prices AS (SELECTDATE(timestamp) as price_date,priceFROM prices.dayWHERE contract_address = 0x2be5e8c109e2197D077D13A82dAead6a9b3433C5 -- TON Contract Address)