Cast transcription comparison averages
This commit is contained in:
@@ -652,9 +652,9 @@ SELECT
|
||||
count(*) FILTER (WHERE item->>'provider' = winner_provider) AS wins,
|
||||
count(*) FILTER (WHERE completed_at > NOW() - INTERVAL '24 hours') AS last_24h_attempts,
|
||||
count(*) FILTER (WHERE completed_at > NOW() - INTERVAL '24 hours' AND item->>'status' = 'ok') AS last_24h_success,
|
||||
COALESCE(avg(NULLIF(item->>'duration_ms', '')::bigint), 0) AS avg_duration_ms,
|
||||
COALESCE(avg(NULLIF(item->>'duration_ms', '')::bigint)::double precision, 0) AS avg_duration_ms,
|
||||
COALESCE(percentile_cont(0.5) WITHIN GROUP (ORDER BY NULLIF(item->>'duration_ms', '')::bigint), 0) AS p50_duration_ms,
|
||||
COALESCE(avg(length(COALESCE(item->>'text', ''))), 0) AS avg_text_chars,
|
||||
COALESCE(avg(length(COALESCE(item->>'text', '')))::double precision, 0) AS avg_text_chars,
|
||||
max(completed_at) AS last_at
|
||||
FROM attempts
|
||||
WHERE COALESCE(item->>'provider', '') <> ''
|
||||
|
||||
Reference in New Issue
Block a user