Query editor
selectsum(total_sol) as total_sol,sum(total_usd) as total_usdfrom(with non_vote as (selectdate_trunc('month', block_time) as day,sum(casewhen fee/required_signatures/1e9>0.000005 then 0.000005*required_signatureselse fee/1e9 end)as non_vote_txn_base,sum(casewhen fee/required_signatures/1e9>0.000005 then fee/1e9-0.000005*required_signatureselse 0 end)as non_vote_txn_priorityfrom solana.transactionswhere block_time>= timestamp '2024-01-01'group by 1),vote as (selectdate_trunc('month', block_time) as day,sum(fee/1e9) as vote_txnfrom solana.vote_transactionswhere block_time>= timestamp '2024-01-01'group by 1),tip as (selectdate_trunc('month',block_date) as day,sum(balance_change/1e9) as tipsfrom solana.account_activitywhere address in('96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5','HFqU5x63VTqvQss8hp11i4wVV8bD44PvwucfZ2bU7gRe','Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY','ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49','DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh','ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt','DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL','3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT')and token_mint_address is nulland balance_change > 0and block_time>= timestamp '2024-01-01'group by 1),price as (selectdate_trunc('month',minute) as day,avg(price) as pricefrom prices.usdwhere contract_address is nulland symbol = 'SOL'and minute>= timestamp '2024-01-01'group by 1)selectnon_vote.day,-- (non_vote.non_vote_txn_base + non_vote.non_vote_txn_priority) * price.price as non_vote_txn,-- vote.vote_txn * price.price as vote_txn,-- tip.tips * price.price as tips,(non_vote.non_vote_txn_base + non_vote.non_vote_txn_priority + vote.vote_txn + tip.tips) as total_sol,(non_vote.non_vote_txn_base + non_vote.non_vote_txn_priority + vote.vote_txn + tip.tips) * price.price as total_usdfrom non_voteleft join vote on non_vote.day=vote.dayleft join tip on non_vote.day=tip.day