-
Notifications
You must be signed in to change notification settings - Fork 74
Useful Queries
Andrew Plaza edited this page Aug 30, 2021
·
12 revisions
List of some queries I've found to be useful.
-- Query for all storage items under a specific key prefix
SELECT encode(storage::bytea, 'hex') FROM
(SELECT storage.key, storage.block_num, blocks.block_num, blocks.spec FROM storage, blocks
WHERE
storage.key like (E'\\x26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9')::bytea||'%'
AND
blocks.block_num = storage.block_num
AND
blocks.spec = 2023
) as z;