Query editor
WITH ratio_table AS (selectsol_usd / aum_usd as sol_ratio,eth_usd / aum_usd as eth_ratio,btc_usd / aum_usd as btc_ratiofrom (selectsol_balance * sol_price as sol_usd,eth_balance * eth_price as eth_usd,btc_balance * btc_price as btc_usd,usdc_balance * usdc_price as usdc_usd,usdt_balance * usdt_price as usdt_usd,(sol_balance * sol_price +eth_balance * eth_price +btc_balance * btc_price +usdc_balance * usdc_price +usdt_balance * usdt_price) as aum_usdfrom (select(selectpost_token_balancefromsolana.account_activitywhereblock_time <= {{query_begin_time}}and block_time >= ({{query_begin_time}} - interval '8' hour)and address = 'BUvduFTd2sWFagCunBPLupG8fBTJqweLw9DuhruNFSCm'order by block_slot desc, tx_index desclimit 1) as sol_balance,(selectpricefrom prices.usdwhere blockchain = 'solana'and symbol = 'SOL'and contract_address = 0x069b8857feab8184fb687f634618c035dac439dc1aeb3b5598a0f00000000001and minute <= {{query_begin_time}}and minute >= ({{query_begin_time}} - interval '8' hour)order by minute desc limit 1) as sol_price,(selectpost_token_balancefromsolana.account_activitywhereblock_time <= {{query_begin_time}}and block_time >= ({{query_begin_time}} - interval '8' hour)and address = 'Bgarxg65CEjN3kosjCW5Du3wEqvV3dpCGDR3a2HRQsYJ'order by block_slot desc, tx_index desclimit 1) as eth_balance,(selectpricefrom prices.usdwhere blockchain = 'solana'and symbol = 'WETH'