Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: metric (#1498)

ecmadaoe087e03dd3d0
diff --git a/store/issue.go b/store/issue.go
index b63176d011..403b2523c9 100644
--- a/store/issue.go
+++ b/store/issue.go
@@ -153,6 +153,7 @@ func (s *Store) CountIssueGroupByTypeAndStatus(ctx context.Context) ([]*metric.I
rows, err := tx.PTx.QueryContext(ctx, `
SELECT type, status, COUNT(*)
FROM issue
+ WHERE (id <= 101 AND updater_id != 1) OR id > 101
GROUP BY type, status`,
)
if err != nil {
diff --git a/store/sheet.go b/store/sheet.go
index f1f9cd9c15..a22e58fbc0 100644
--- a/store/sheet.go
+++ b/store/sheet.go
@@ -159,7 +159,7 @@ func (s *Store) CountSheetGroupByRowstatusVisibilitySourceAndType(ctx context.Co
rows, err := tx.PTx.QueryContext(ctx, `
SELECT row_status, visibility, source, type, COUNT(*) AS count
- FROM sheets
+ FROM sheet
GROUP BY row_status, visibility, source, type`)
if err != nil {
return nil, FormatError(err)