Pick a question, or search for anything on Arweave
Show the SQLHide the SQL edit it, or write your own
Start from an example:
Columns and SQL tips
The txs table
| tx_id | Transaction ID, base64url, as you would paste into a gateway URL |
| height | Block height it was mined in |
| mined_at | When that block was mined, a real timestamp you can date_trunc |
| owner | Wallet address that signed it, base64url |
| target | Recipient address for a transfer, empty otherwise |
| data_size | Bytes of data, as an integer |
| content_type | Its Content-Type tag, often NULL |
| quantity | AR transferred, in winston |
| reward | Mining fee paid, in winston |
| format | 1 or 2, the transaction format |
| data_root | Merkle root of the data, base64url |
The blocks table
| height | Block height, joins to txs.height |
| mined_at | Timestamp the block was mined |
| tx_count | Transactions in the block |
| block_size | Bytes the block added to the weave |
| block_id | Its independent hash, base64url |
Writing a query
- It is ordinary SQL.
SELECT,WHERE,GROUP BY,ORDER BY,JOINand window functions all work. - IDs and addresses are plain text here, so
WHERE owner = 'FPjb…'is all a wallet lookup needs. Matching the stored bytes is quicker, since nothing is decoded first:FROM rawtx WHERE owner_address = unb64u('FPjb…'). Either way a wallet over all history reads every band's wallet column, a few hundred MB; a transaction ID found with the search bar reads a few dozen. - Three shortcuts work over any period:
SELECT * FROM find_tx('…'),wallet_totals('…')andtag_counts('App-Name'). Where the bands carry lookup files they read those, about a megabyte a band, instead of a whole column. - Sizes are bytes. Divide to taste:
round(data_size / power(2,20), 2) AS mib. - AR amounts are winston, so divide by
1e12for AR. - Questions cover the period chosen at the top, next to the search bar. Pick a wider one to reach further back.
- Everything runs locally, so a mistake costs nothing. Try things.