Spice.ai Documentation
Signup/Login
Blog
Twitter
Discord
Telegram
Ask or search…
⌃
K
Links
🌟
Getting Started
Welcome to Spice.ai
Quickstart
Core Concepts
Best Practices
Limitations
Pricing
FAQ
🧱
Building Blocks
Web3 Data
External Data Sources
Datasets and Views
🔥
Spice Firecache
Spice Functions
Blockchain Nodes
💻
API
SQL Query API
Ethereum API
Goerli API
Polygon API
Prices API
Predictions API
Health API
👨💻
Portal
Apps
Organizations
SQL Query Editor
Monitoring and Request Logs
Profile Settings
🔗
SDKs
Python SDK
Node.js SDK
Go SDK
🆕
Rust SDK
🔌
Integrations
Grafana
Grafana Dashboard Examples
🎓
Tutorials
Tokens & NFTs
Asset Transfer Valuations
📚
REFERENCE
SQL Reference
SQL Query Tables
Specifications
Samples and Examples
Example Ethereum (EVM) SQL Queries
🆕
Example Ethereum Beacon SQL Queries
Example DEX Queries
Example Bitcoin Queries
Blocks
Transaction Fees
Transactions
Transaction Inputs/Outputs
Example Cross-Chain Queries
Arrow Flight Samples
Data Science & Machine Learning
Kaggle Notebooks
Release notes
🆘
Support
Support
🔐
Security
Security at Spice AI
Report a vulnerability
⚖
Legal
Privacy Policy
Website Terms of Use
Terms of Service
End User License Agreement
Powered By
GitBook
Comment on page
Blocks
Monthly Block Count
Gets the number of blocks produced each month.
Typical query time
: 1-2 second
SELECT
DATE_TRUNC
(
'month'
,
TO_TIMESTAMP
(
"timestamp"
))
AS
"month"
,
COUNT
(
*
)
AS
block_count
FROM
btc
.
blocks
GROUP
BY
"month"
ORDER
BY
"month"
DESC
Previous
Example Bitcoin Queries
Next
Transaction Fees
Last modified
1mo ago