Query editor
-- VeeFriends Core Collections: Floor Price Time Series-- Tracks floor prices over time for all core collections-- S1 broken out by rarity tier for flexible charting---- Methodology:-- - S1: MIN sale price per rarity tier (enables Core-only or all-tier views)-- - S2/Iconics/Book Games: MIN sale price (single tier collections)---- Dashboard Usage:-- - Filter collection_key to select which lines to show-- - For S1 vs S2 comparison, use collection_key IN ('s1_core', 's2')-- - For full S1 rarity breakdown, use collection_key LIKE 's1_%'---- Params:-- {{Granularity}} - day | week | month-- {{LookbackDays}} - Number of days of history (e.g., 365)-- {{StartDate}} - Optional start date filter (YYYY-MM-DD format, or any invalid value = no filter)WITHbounds AS (SELECTDATE_TRUNC('{{Granularity}}', NOW() - INTERVAL '{{LookbackDays}}' DAY) AS start_time,DATE_TRUNC('{{Granularity}}', NOW()) AS end_time),-- S1 token → rarity mappings1_rarity AS (SELECTCAST(token_id AS UINT256) AS token_id,rarity_tierFROM dune.jeremyknowsvf.dataset_series1_token_metadata),-- All S1 trades with rarity-- Note: Use amount_raw for WETH trades as amount_original may be 0-- Only ETH/WETH trades contribute to floor_eth (non-ETH currencies would be misinterpreted)s1_trades AS (SELECTDATE_TRUNC('{{Granularity}}', t.block_time) AS period,r.rarity_tier,CASEWHEN t.currency_symbol IN ('ETH', 'WETH')THEN CAST(t.amount_raw AS DOUBLE) / 1e18ELSE NULL -- Exclude non-ETH trades from ETH floor calculationEND AS price_eth,t.amount_usd AS price_usdFROM nft.trades tINNER JOIN s1_rarity r ON t.token_id = r.token_idCROSS JOIN bounds bWHERE t.blockchain = 'ethereum'AND t.nft_contract_address = 0xa3aee8bce55beea1951ef834b99f3ac60d1abeebAND t.block_time >= b.start_timeAND (t.amount_original > 0 OR t.currency_symbol = 'WETH')AND t.amount_usd > 0),-- S1 floors by rarity tiers1_floors AS (SELECTperiod,