Query editor
--Error: Query is too long for wand tools.--Try shortening query to try again./* Error: Query is too long for wand tools. *//* Try shortening query to try again. *//* Error: Query is too long for wand tools. *//* Try shortening query to try again. *//* Error: Query is too long for wand tools. *//* Try shortening query to try again. */WITH block_data AS (SELECTnumber AS block_number,DATE_TRUNC('day', time) AS block_day,DATE_TRUNC('week', time) AS block_week,DATE_TRUNC('month', time) AS block_month,miner,gas_limit,gas_used,base_fee_per_gasFROM bob.blocks /* Utilisation de bob.blocks */), transaction_data AS (SELECThash AS tx_hash,block_number,value,gas_price,TRY_CAST(value AS DOUBLE) / 1e18 AS value_usd, /* Conversion en USD si la table enregistre en WEI ou autre */successFROM bob.transactions /* Utilisation de bob.transactions */), log_data AS (SELECTblock_number,tx_hash,tx_from,tx_to,1e18 AS log_value /* Conversion de `data` en double si c’est un montant de transaction */FROM bob.logs /* Utilisation de bob.logs */), trace_data AS (SELECTblock_number,tx_hash,tx_from,tx_to,TRY_CAST(value AS DOUBLE) / 1e18 AS trace_value, /* Conversion de `value` pour un format cohérent */type AS trace_type,success AS trace_successFROM bob.traces /* Utilisation de bob.traces */), consolidated_transactions /* Consolidation de toutes les transactions et logs en une vue unifiée */ AS (SELECTt.value_usd AS value,b.block_day AS day,b.block_week AS week,b.block_month AS month,b.gas_used AS gas_used,t.tx_hash AS transaction_hash,CASEWHEN NOT l.log_value IS NULLTHEN l.log_valueWHEN NOT tr.trace_value IS NULLTHEN tr.trace_valueELSE t.value_usd