1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-24 10:07:21 +02:00
woodpecker/store/datastore/sql/postgres/files/counts.sql
2017-07-25 15:42:11 -04:00

16 lines
232 B
SQL

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