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

16 lines
228 B
MySQL
Raw Normal View History

2017-05-03 23:25:33 +02:00
-- name: count-users
SELECT reltuples
2017-07-25 21:32:22 +02:00
FROM pg_class WHERE relname = 'users'
2017-05-03 23:25:33 +02:00
-- name: count-repos
2017-07-25 21:32:22 +02:00
SELECT count(1)
FROM repo
WHERE repo_active = 1
2017-05-03 23:25:33 +02:00
-- name: count-builds
SELECT reltuples
2017-07-25 21:32:22 +02:00
FROM pg_class WHERE relname = 'builds'