Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
erikd committed Oct 19, 2020
1 parent 560254b commit 077421f
Showing 1 changed file with 13 additions and 30 deletions.
43 changes: 13 additions & 30 deletions doc/interesting-queries.md
Expand Up @@ -198,37 +198,20 @@ cexplorer=# select reward.epoch_no, pool_hash.view as delegated_pool, reward.amo
(10 rows)
```

### Get the number of blocks created by epoch for a specified pool


select epoch_no, slot_no, epoch_slot_no, vrf_key from block where vrf_key is not null limit 5 ;


epoch_no | slot_no | block_no | previous | merkel_root | slot_leader | size | time | tx_count | epoch_slot_no




cexplorer=# select epoch_no, slot_no, epoch_slot_no, vrf_key from block where vrf_key is not null limit 5 ;
epoch_no | slot_no | epoch_slot_no | vrf_key
----------+---------+---------------+-------------------------------------------------------------------
208 | 4492800 | 0 | vrf_vk1dkfsejw3h2k7tnguwrauqfwnxa7wj3nkp3yw2yw3400c4nlkluwqzwvka6
208 | 4492840 | 40 | vrf_vk1nsd60hkw7uahngavcnq9g95tt2ewh477cwtmtdtnxk70g0cpdfxqknqup3
208 | 4492860 | 60 | vrf_vk1jptpea0mf6k6w78s2eqxpwd4zw8mlfgvpe60cjtf2myvx5rnqxnqt57spl
208 | 4492880 | 80 | vrf_vk1f8d5uguzjzvmnwpu7cfx0x3eq4umsmqkdqk4m0w4ftsk07h9e99sxnsyzn
208 | 4492900 | 100 | vrf_vk1dvwps7slwsmaq70yzsctd20u0v5mym5te8zxw2892yafxp8jyfhsvjjnqh
(5 rows)

cexplorer=# select hash_id, vrf_key from pool_update limit 5 ;
hash_id | vrf_key
---------+--------------------------------------------------------------------
1 | \x0220a5d08adbfe9554b52d7b2993be5892ac3ff340e674a377dea3e22ad1778b
2 | \xb512cc7c1a8ba689c2d8fd27adfdbac2049a3f8f95c8b85e8298f14d7d8dc4e6
3 | \xb8ba5f7dcbf17e95781e325114da46def1fa908435a27dcae2f5332028fa001a
4 | \xb75115a1e4e32a33985fc720f3715f0e99617b448fbc36867deb5c9eaa59e2ff
5 | \x78b0b08fec7458afd1209dcd26bd0c10faa640a49d50137200f1656af56a4f1d
(5 rows)
### Get the number of blocks created in an epoch by a specified pool

```
cexplorer=# select block.block_no, block.epoch_no, pool_hash.view as pool_view
from block inner join slot_leader on block.slot_leader = slot_leader.id
inner join pool_hash on slot_leader.pool_hash_id = pool_hash.id
where block.epoch_no = 220
and pool_hash.view = 'pool137x32lrkprphrd0aa8x4jqz98z6lc0wawlc88hdjeps4qe408ad' ;
block_no | epoch_no | pool_view
----------+----------+----------------------------------------------------------
4760198 | 220 | pool137x32lrkprphrd0aa8x4jqz98z6lc0wawlc88hdjeps4qe408ad
4759847 | 220 | pool137x32lrkprphrd0aa8x4jqz98z6lc0wawlc88hdjeps4qe408ad
(2 rows)
```

---

Expand Down

0 comments on commit 077421f

Please sign in to comment.