fix: correct precision and scale in select query

main
Guillaume Dott 2023-01-25 15:53:00 +01:00
parent e107ffe987
commit 6f40a9f371
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ module Rating
sql = %(
SELECT
(CAST(#{total_count} AS DECIMAL(17, 14)) / #{distinct_count}) count_avg,
(CAST(#{total_count} AS DECIMAL(25, 16)) / #{distinct_count}) count_avg,
COALESCE(AVG(value), 0) rating_avg
FROM #{rate_table_name}
WHERE