Skip to content

Commit

Permalink
tapdb: remove universe namespace from stats group by
Browse files Browse the repository at this point in the history
The universe_stats view represents per asset/asset group aggregated
stats. However, the universe namespace field is now specific to a proof
type. This commit removes the namespace field from the stats group by.
  • Loading branch information
ffranr committed Oct 11, 2023
1 parent 3b9ae40 commit fbab2ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions tapdb/sqlc/migrations/000007_universe.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ CREATE VIEW universe_stats AS
COUNT(CASE WHEN u.event_type = 'SYNC' THEN 1 ELSE NULL END) AS total_asset_syncs,
COUNT(CASE WHEN u.event_type = 'NEW_PROOF' THEN 1 ELSE NULL END) AS total_asset_proofs,
roots.asset_id,
roots.group_key,
roots.namespace_root
roots.group_key
FROM universe_events u
JOIN universe_roots roots ON u.universe_root_id = roots.id
GROUP BY roots.asset_id, roots.group_key, roots.namespace_root;
GROUP BY roots.asset_id, roots.group_key;
1 change: 0 additions & 1 deletion tapdb/sqlc/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fbab2ec

Please sign in to comment.