fix: correct precision and scale in select query
This commit is contained in:
		
							parent
							
								
									e107ffe987
								
							
						
					
					
						commit
						6f40a9f371
					
				| @ -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 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user