Skip to content

Commit

Permalink
up: increases the scale and precision
Browse files Browse the repository at this point in the history
  • Loading branch information
wbotelhos committed Jan 25, 2024
1 parent 3483044 commit bc107d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rating/models/rating/rating.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def averager_data(resource, scopeable)

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
Expand Down

0 comments on commit bc107d5

Please sign in to comment.