Query editor
with days_seq as (with seq as (SELECTsequence(date('2024-02-14'), date_trunc('day', cast(now() as timestamp)), interval '1' day) as day)SELECTdays.dayFROM seqCROSS JOIN unnest(day) as days(day)),hc_price as (select amount_original*price as usd_value from nft.trades,(select price from prices.usd_latest where blockchain='ethereum' and symbol='WETH')where blockchain='ethereum' and nft_contract_address=0xcb0477d1af5b8b05795d89d59f4667b59eae9244order by block_time desc limit 1),zro_price as (select date_trunc('day',minute) as day, avg(price) as zro_pricefrom prices.usdwhere contract_address=0x6985884C4392D348587B19cb9eAAf157F13271cd and blockchain='arbitrum'group by 1),dyad_price as (select minute, avg(price) as kerosene_price from(select date_trunc('minute',block_time) as minute , CASEwhen token_bought_address=0xf3768D6e78E65FC64b8F12ffc824452130BD5394 then amount_usd/token_bought_amountwhen token_sold_address=0xf3768D6e78E65FC64b8F12ffc824452130BD5394 then amount_usd/token_sold_amountEND as pricefrom dex.tradeswhere (token_bought_address=0xf3768D6e78E65FC64b8F12ffc824452130BD5394 OR token_sold_address=0xf3768D6e78E65FC64b8F12ffc824452130BD5394)and blockchain='ethereum' and date_trunc('day',block_time)>=TIMESTAMP '2024-06-26') --airdrop dategroup by 1),beraplug_price as (select minute, avg(price) as plug_price from(select date_trunc('minute',block_time) as minute, CASEwhen token_bought_address=0x231A6BD8eB88Cfa42776B7Ac575CeCAf82bf1E21 then amount_usd/token_bought_amountwhen token_sold_address=0x231A6BD8eB88Cfa42776B7Ac575CeCAf82bf1E21 then amount_usd/token_sold_amountEND as pricefrom dex.tradeswhere (token_bought_address=0x231A6BD8eB88Cfa42776B7Ac575CeCAf82bf1E21 OR token_sold_address=0x231A6BD8eB88Cfa42776B7Ac575CeCAf82bf1E21)and blockchain='ethereum'order by block_time desc)group by 1),uwu_price as (select minute, avg(price) as uwu_price from (select date_trunc('minute', block_time) as minute,CASEwhen token_sold_mint_address='UwU8RVXB69Y6Dcju6cN2Qef6fykkq6UUNpB15rZku6Z' then amount_usd/token_sold_amountwhen token_bought_mint_address='UwU8RVXB69Y6Dcju6cN2Qef6fykkq6UUNpB15rZku6Z' then amount_usd/token_bought_amountEND as pricefrom dex_solana.tradeswhere (token_sold_mint_address='UwU8RVXB69Y6Dcju6cN2Qef6fykkq6UUNpB15rZku6Z' or token_bought_mint_address='UwU8RVXB69Y6Dcju6cN2Qef6fykkq6UUNpB15rZku6Z')and token_pair='TEMP-SOL'order by minute desc)