Query editor
--The goal of this query is to clearly define specific metrics on the solana network for the last 7 days--WITH base AS (SELECTblock_date,fee / 1e9 AS fees_sol, --To convert solana fee to $sol. it is usually in lamport --successFROM solana.transactionsWHERE block_date >= CURRENT_DATE - INTERVAL '7' DAY)SELECTblock_date,COUNT(*) AS total_txn,COUNT(*) FILTER (WHERE success) AS succesful_txn,COUNT(*) FILTER (WHERE NOT success) AS failed_txn,ROUND(100.0 * COUNT(*) FILTER (WHERE success) / NULLIF(COUNT(*),0), 2) AS success_txn_in_percentage,--NULLIF is to make sure we are not dividing by zero--ROUND(SUM(fees_sol), 2) AS total_fee_in_sol,ROUND(AVG(fees_sol), 6) AS avg_fee_per_txn_in_solFROM baseGROUP BY block_date --am grouping it by block_date to make sure that no 2 dates shows--ORDER BY block_date