Query editor
/* Calculate the average total transactions and average non-vote transactions grouped by actual blocks produced */WITH fee_rewards AS (SELECTblock_date AS date,AVG(CASEWHEN recipient = 'R1parD2CtxPBGPABB2m3JjuLpGgNLiJuLxyt7qvAJR3'THEN lamportsELSE NULLEND) AS avg_lamports_r1par,AVG(lamports) AS avg_lamportsFROM solana.rewardsWHEREreward_type = 'Fee' AND block_date >= CURRENT_DATE - INTERVAL '14' DAYGROUP BYblock_date), SelectedSlots AS (SELECTAVG(b.total_transactions) AS AvgTotalTransactions,AVG(b.total_non_vote_transactions) AS AvgNonVoteTransactionsFROM solana.blocks AS bJOIN solana.rewards AS rON b.slot = r.block_slotWHEREr.reward_type = 'Fee' AND r.recipient = 'R1parD2CtxPBGPABB2m3JjuLpGgNLiJuLxyt7qvAJR3')SELECT'Average for Selected Slots' AS Description,AvgTotalTransactions,AvgNonVoteTransactionsFROM SelectedSlotsUNION ALLSELECT'Average for All Slots in Time Range' AS Description,AVG(b.total_transactions) AS AvgTotalTransactions,AVG(b.total_non_vote_transactions) AS AvgNonVoteTransactionsFROM solana.blocks AS bJOIN solana.rewards AS rON b.slot = r.block_slotWHEREr.reward_type = 'Fee'AND r.recipient = 'R1parD2CtxPBGPABB2m3JjuLpGgNLiJuLxyt7qvAJR3'