Query editor
WITH new_tokens_solana as (SELECTtx_idFROM tokens_solana.transfersWHERE outer_executing_account = '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P'GROUP BY 1),sol_price as (SELECTminute,priceFROM prices.usdWHERE contract_address is nulland symbol = 'SOL'),fees as (SELECTa.tx_id,a.block_time,a.address as tx_signer,'Sell' as action_type,balance_change/1e9 as total_sol,balance_change/1e9 * price as total_usd_solFROM solana.account_activity aLEFT JOIN new_tokens_solana nON n.tx_id = a.tx_idLEFT JOIN sol_price ON date_trunc('minute',a.block_time) = minuteWHERE DATE(a.block_time) > DATE('2024-03-01')and balance_change > 0and a.token_mint_address is nulland a.address = 'CebN5WGQ4jvEPvsVU4EoHEpgzq1VV7AbicfhtW4xC9iM')SELECTdate_trunc('day',block_time) as date_time,SUM(total_sol) as total_sol_revenue,SUM(total_usd_sol) as total_sol_revenue_usd,SUM(SUM(total_sol)) OVER (ORDER BY date_trunc('day',block_time)) as cumulative_volume_sol,SUM(SUM(total_usd_sol)) OVER (ORDER BY date_trunc('day',block_time)) as cumulative_volume_usdFROM feesGROUP BY 1ORDER BY 1 DESC