on-prem analytics queries

This commit is contained in:
Brandon Thomas committed 2022-09-09 14:40:41 -04:00
1 parent 2bc00dd6ca
commit ec1f5edd5c
1 file changed
+15
+15
View File
@@ -16,3 +16,18 @@ select count(*) as use_count
from tts_results
where created_at > ( CURDATE() - INTERVAL 7 DAY )
-- On-prem worker mix
select count(*) as use_count
from tts_results
where created_at > ( CURDATE() - INTERVAL 1 MINUTE )
and is_generated_on_prem IS TRUE
-- Calculate a percentage of on-prem worker capacity
select count(*) as on_prem_count
from (
select is_generated_on_prem
from tts_results
order by id desc limit 1000
) as sample
where sample.is_generated_on_prem IS TRUE;