Skip to content

Commit

Permalink
Add current valid pool to interesing queries
Browse files Browse the repository at this point in the history
  • Loading branch information
erikd committed Aug 2, 2020
1 parent 0f247ee commit d4c8b71
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/interesting-queries.md
Expand Up @@ -72,4 +72,15 @@ cexplorer=# select pg_size_pretty (pg_database_size ('cexplorer'));
(1 row)
```

### Current valid pools
In general the database is operated on in an append only manner. The means that when there is a
pool registration, followed by a degreistration followed by a second registration, all three
events will be recorded. To get the latest pool registrations:
two stake pool
```
cexplorer=# select * from pool_update where not exists
(select update_id from pool_retire where update_id = pool_update.id) ;
```


[Query.hs]: https://github.com/input-output-hk/cardano-db-sync/blob/master/cardano-db/src/Cardano/Db/Query.hs

0 comments on commit d4c8b71

Please sign in to comment.