Query editor
--Goal of this query is to clearly define specific metrics on the solana network for the last 7 daysWITH solbase AS (SELECTblock_date,fee/1e9 AS fees_sol, --converts lamports to sol. 1 sol = 1 billion lamports ie, 9 zerossuccessFROM solana.transactionsWHERE block_date >= CURRENT_DATE - INTERVAL '7' DAY)SELECT --final selectblock_date,COUNT(*) AS total_transactions,COUNT(*) FILTER(WHERE success) AS successful_transactions,COUNT(*) FILTER(WHERE NOT success) AS failed_transactions,ROUND(100.0 * COUNT(*)FILTER(WHERE success)/ NULLIF(COUNT(*), 0), 2) AS success_rate_percent, --this line is asking us to find the success rate of all transactions on the solana network rounded up to 2 decimal places by dividing the successful transactions by the total transactions. All transactions have a filter where we are making sure we are not dividing by zero.ROUND(SUM(fees_sol),2) AS total_fees_sol,ROUND(AVG(fees_sol), 6) AS avg_fee_per_txn_solFROM solbaseGROUP BY block_dateORDER BY block_date;