Example queries
Run a query using the Space and Time dapp, REST APIs, or JDBC driver.
For a step-by-step tutorial on how to run your first query with example code included, visit the Run your first query page in the Getting Started guide.
Queries in Space and Time
You can run SQL queries against:
- Your own tables in Space and Time, containing off-chain data that you've ingested
- Tables containing relational, real-time blockchain data that we've indexed from major chains
For more information on writing SQL, visit the Writing SQL page.
You can run a query using our SQL APIs or using our JDBC driver.
Example Queries
What is the Ethereum balance of a given wallet?
-
resourceId
:ETHEREUM.NATIVE_WALLET
-
sqlText
:
SELECT BLOCK_NUMBER, WALLET_ADDRESS, BALANCE, TIME_STAMP
FROM ETHEREUM.NATIVE_WALLET
WHERE WALLET_ADDRESS = "0xb66cd966670d962C227B3EABA30a872DbFb995db";
Try replacing the
WALLET_ADDRESS
above with your wallet address and see what comes up.
Updated about 1 year ago