The Scenario
You've inherited a blockchain research project from a colleague who left two weeks ago. The model they were building needs the last 1,000 Bitcoin blocks — height, timestamp, transaction count, total fees in BTC, and miner address — in an Excel workbook for a network-health statistical analysis.
There's no documentation. There's no script. There's an Excel workbook with five empty columns and a sticky note that says "Bitquery archive."
You've found the Bitquery docs. You've found the Bitcoin block query endpoint. You've never written a GraphQL query in your life.
The bad version:
- Read the Bitquery schema docs for 40 minutes, copy a block query example, modify the fields to match what you need, discover the pagination parameter isn't where you thought it was
- Run the query in the IDE, get 100 blocks back instead of 1,000 because you missed the limit override, discover the timestamp format is Unix epoch and your workbook needs ISO 8601
- Export as JSON, try to import into Excel, find that Power Query misinterprets the nested miner field, flatten manually in a text editor before re-importing
The model needs to run by end of week. You are not a blockchain developer. You were asked to finish someone else's research setup in a tool you've never used.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Excel workbook. It understands what you're looking at, connects to Bitquery's archive database, and writes structured results directly into your workbook — pagination, field extraction, and timestamp formatting handled.
Open the SheetXAI sidebar and paste this prompt:
Query Bitquery's archive database for the last 500 Bitcoin blocks and populate this sheet with block height, timestamp, transaction count, total fees in BTC, and miner address
What You Get
- Column A: block height, integer descending
- Column B: block timestamp, ISO 8601 formatted
- Column C: transaction count per block
- Column D: total fees in BTC, numeric
- Column E: miner address (coinbase recipient)
- 500 rows populated in a single run — no pagination to manage manually
What If the Data Is Not Quite Ready
You need 1,000 blocks, not 500
Query Bitquery's Bitcoin archive for the last 1,000 blocks and write block height, ISO timestamp, transaction count, total fees in BTC, and miner address into columns A through E of this sheet. Paginate as needed.
The miner addresses need to be looked up against a worksheet that maps known addresses to mining pool names
For each block in column A, match the miner address in column E against the mining pool lookup table in worksheet "Pools" (address in column A, pool name in column B). Write the matched pool name into column F. Leave column F blank if no match is found.
You only want blocks with more than 2,000 transactions
Query Bitquery's Bitcoin archive for the last 1,000 blocks. Write only blocks with transaction count above 2,000 into this sheet with height, timestamp, transaction count, fees in BTC, and miner address.
You want to clean the data, flag empty miner fields, and calculate a 7-block rolling average fee — all in one pass
Pull the last 1,000 Bitcoin blocks from Bitquery archive. Write height, timestamp, transaction count, fees in BTC, and miner address into columns A–E. Flag rows where miner address is missing or empty in column F. In column G, calculate a 7-block rolling average of total fees.
The pattern: structure the output, flag anomalies, and compute derived metrics — all in the same prompt.
Try It
Get the 7-day free trial of SheetXAI and open a blank Excel workbook, then ask SheetXAI to pull 1,000 Bitcoin blocks from Bitquery with fees, transaction counts, and miner addresses. For related tasks, see how to pull ERC-20 transfer history or explore the full Bitquery integration overview.
