Query editor
-- 8번 쿼리: 전체 시장 요약 통계WITH market_summary AS (SELECTCOUNT(*) as total_transactions,COUNT(DISTINCT "from") as total_borrowers,COUNT(DISTINCT "to") as total_lenders,SUM(value / 1e18) as total_volume_eth,AVG(value / 1e18) as avg_tx_size_eth,MAX(value / 1e18) as max_tx_size_eth,MIN(block_time) as first_tx,MAX(block_time) as last_txFROM ethereum.transactionsWHERE block_time >= now() - interval '30' dayAND value / 1e18 >= 1AND success = true)SELECT'Total Transactions' as metric,total_transactions as valueFROM market_summaryUNION ALLSELECT'Total Borrowers' as metric,total_borrowers as valueFROM market_summaryUNION ALLSELECT'Total Lenders' as metric,total_lenders as valueFROM market_summaryUNION ALLSELECT'Total Volume (ETH)' as metric,ROUND(total_volume_eth, 2) as valueFROM market_summaryUNION ALLSELECT'Average TX Size (ETH)' as metric,ROUND(avg_tx_size_eth, 2) as valueFROM market_summaryUNION ALLSELECT'Max TX Size (ETH)' as metric,ROUND(max_tx_size_eth, 2) as valueFROM market_summary;