analytics query

This commit is contained in:
Brandon Thomas committed 2023-01-23 23:21:44 -05:00
1 parent 4152b346c1
commit dbfd80531d
1 file changed
+29
+29
View File
@@ -62,6 +62,35 @@ from (
order by r.use_count desc
limit 500;
--
-- Top 20 ***NEW*** models to share in #announcements
-- Can be scoped by creator.
--
select
m.token,
m.text_pipeline_type,
m.ietf_language_tag,
m.title,
u.username,
r.use_count,
m.user_deleted_at,
m.mod_deleted_at,
m.created_at
from (
select model_token, count(*) as use_count
from tts_results
where created_at > ( CURDATE() - INTERVAL 5 DAY )
group by model_token
) as r
join tts_models as m
on m.token = r.model_token
join users as u
on u.token = m.creator_user_token
where m.created_at > ( CURDATE() - INTERVAL 31 DAY )
AND u.username IN ( 'vegito1089', 'justinjohn0306')
order by r.use_count desc
limit 500;
--
-- Top 500 models by use count, last 5 days, not spanish, etc.
-- Limited due to tmux scrollback.