mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 08:57:54 +00:00
analytics queries
This commit is contained in:
1 parent
f1d8161481
commit
03ed0b4c7b
4 files changed
+32
-1
No files matched your search
@@ -72,3 +72,30 @@ where model_token = 'TM:ztt5s1be5tq6'
|
||||
and mod_deleted_at IS NULL
|
||||
limit 5000;
|
||||
|
||||
--- Search for particular text by a particular model
|
||||
SELECT
|
||||
raw_inference_text,
|
||||
maybe_creator_user_token,
|
||||
created_at
|
||||
FROM
|
||||
tts_results
|
||||
WHERE
|
||||
model_token = 'TM:ztt5s1be5tq6'
|
||||
AND raw_inference_text LIKE '%fakeyou%'
|
||||
|
||||
---
|
||||
-- WTF WHY IS THIS SLOW???
|
||||
SELECT
|
||||
res.id,
|
||||
model.title,
|
||||
res.raw_inference_text,
|
||||
res.maybe_creator_user_token
|
||||
FROM
|
||||
tts_results AS res
|
||||
JOIN
|
||||
tts_models as model
|
||||
ON
|
||||
res.model_token = model.token
|
||||
ORDER BY res.id
|
||||
LIMIT 10;
|
||||
|
||||
@@ -27,7 +27,7 @@ FROM (
|
||||
from user_subscriptions
|
||||
)
|
||||
AND
|
||||
j.created_at > ( CURDATE() - INTERVAL 1 MONTH )
|
||||
j.created_at > ( CURDATE() - INTERVAL 1 DAY )
|
||||
GROUP BY t.token
|
||||
ORDER BY use_count DESC
|
||||
) as x
|
||||
@@ -65,6 +65,7 @@ FROM (
|
||||
(
|
||||
select distinct user_token
|
||||
from user_subscriptions
|
||||
where created_at > (CURDATE() - INTERVAL 2 DAY)
|
||||
)
|
||||
) AS x
|
||||
WHERE rownum = 1
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
|
||||
pub async fn get_tts_model_upload_
|
||||
@@ -1 +1,2 @@
|
||||
pub mod get_tts_model_upload_job_status;
|
||||
pub mod insert_tts_model_upload_job;
|
||||
Reference in new issue
Block a user