Query editor
--THE GOAL OF THIS QUERY IS TO CLEARLY DEFINE SPECIFIC METRICS ON THE SOLANA NETWORK FOR THE LAST 7 DAYS----BELOW IS A CTEWITH base AS (SELECTblock_date,fee / 1e9 AS fees_sol, --converted lamports to sol--successFROM solana.transactionsWHERE block_date >= CURRENT_DATE - INTERVAL '7' DAY)--FINAL SELECT--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 two decimal places, by dividing the successful transactions by all transactions. All transactions have a filter where we are making sure we are not dividing by zeroROUND(SUM(fees_sol), 2) AS total_fees_sol,ROUND(AVG(fees_sol), 6) AS avg_per_txn_solFROM baseGROUP BY block_dateORDER BY block_date ASC