Fix datatypes in query

This commit is contained in:
Roberto Alsina 2024-05-15 20:06:35 -03:00
parent 6ed644d1d0
commit 9283ee0a03

View File

@ -156,7 +156,7 @@ class Handler
if prefijo.nil? && year.nil?
# Global totals
sql = %(
SELECT total, nombre
SELECT total::integer, nombre
FROM totales
ORDER BY total DESC
LIMIT 50
@ -164,7 +164,7 @@ class Handler
elsif prefijo.nil? && !year.nil?
# Per-year totals
sql = %(
SELECT contador, nombre
SELECT contador::integer, nombre
FROM nombres
WHERE
anio = '#{year}'