Changed sql query for grafana_admin_count

This commit is contained in:
utkarshcmu 2016-01-25 14:30:36 -08:00
parent 2190392e05
commit 442db7fee1

View File

@ -83,8 +83,9 @@ func GetAdminStats(query *m.GetAdminStatsQuery) error {
FROM ` + dialect.Quote("star") + `
) AS starred_db_count,
(
SELECT SUM ( ` + dialect.Quote("is_admin") + ` )
SELECT COUNT(*)
FROM ` + dialect.Quote("user") + `
WHERE ` + dialect.Quote("is_admin") + ` = 1
) AS grafana_admin_count
`