[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis page provides query examples for conducting Blockchain Analytics on the Avalanche network using BigQuery.\u003c/p\u003e\n"],["\u003cp\u003ePre-GA products and features, such as those discussed on this page, are subject to the "Pre-GA Offerings Terms" and have limited support.\u003c/p\u003e\n"],["\u003cp\u003eA query is provided to determine the first and most recent indexed block on the Avalanche blockchain, along with the total number of blocks indexed.\u003c/p\u003e\n"],["\u003cp\u003eAnother query is provided to identify the blocks with the highest value of AVAX transferred between accounts, focusing on successful transactions.\u003c/p\u003e\n"],["\u003cp\u003eBigQuery is the tool used for these queries, and a link to the BigQuery documentation and console is provided for further assistance.\u003c/p\u003e\n"]]],[],null,["# Avalanche example queries\n\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis page provides Blockchain Analytics query examples for Avalanche.\n\nSee the [BigQuery documentation](/bigquery/docs/introduction) for\ninstructions on using BigQuery.\n\nView the first and last block indexed\n-------------------------------------\n\nThis query tells you how fresh the data is.\n\nIn the Google Cloud console, go to the **BigQuery** page.\n\n[Go to BigQuery](https://console.cloud.google.com/bigquery?sq=650023896125:f135e42cd4a041d9a272b935436c474f)\n\nThe following query is loaded into the **Editor** field: \n\n SELECT\n MIN(block_number) AS `First block`,\n MAX(block_number) AS `Newest block`,\n COUNT(1) AS `Total number of blocks`\n FROM\n bigquery-public-data.goog_blockchain_avalanche_contract_chain_us.blocks;\n\nThe following shows an example result:\n\nView the blocks with largest AVAX value transfer\n------------------------------------------------\n\nThis query shows you which blocks had the largest total value of AVAX\ntransferred between accounts. It only counts successful transactions.\n\nIn the Google Cloud console, go to the **BigQuery** page.\n\n[Go to BigQuery](https://console.cloud.google.com/bigquery?sq=650023896125:97243666e96b4504bdb3c9ae4085c782)\n\nThe following query is loaded into the **Editor** field: \n\n SELECT block_hash, SUM(value.bignumeric_value / 1000000000000000000) value_total\n FROM `bigquery-public-data.goog_blockchain_avalanche_contract_chain_us.transactions`\n JOIN `bigquery-public-data.goog_blockchain_avalanche_contract_chain_us.receipts` USING (block_hash, transaction_hash)\n WHERE status = 1\n GROUP BY block_hash\n ORDER BY value_total DESC\n LIMIT 5\n\nThe following shows an example result:"]]