From 9283ee0a03f74806b7d77a2069c1c20a66ee9907 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Wed, 15 May 2024 20:06:35 -0300 Subject: [PATCH] Fix datatypes in query --- c-busqueda/handler.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c-busqueda/handler.cr b/c-busqueda/handler.cr index b5891ed..2f8fb55 100644 --- a/c-busqueda/handler.cr +++ b/c-busqueda/handler.cr @@ -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}'