1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-18 08:26:45 +02:00
woodpecker/store/datastore/sql/postgres/files/counts.sql
2017-07-25 15:32:22 -04:00

16 lines
228 B
SQL

-- name: count-users
SELECT reltuples
FROM pg_class WHERE relname = 'users'
-- name: count-repos
SELECT count(1)
FROM repo
WHERE repo_active = 1
-- name: count-builds
SELECT reltuples
FROM pg_class WHERE relname = 'builds'