Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created July 2, 2019 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/b56c956006e29295cd116a7ba54f8249 to your computer and use it in GitHub Desktop.
Save parzibyte/b56c956006e29295cd116a7ba54f8249 to your computer and use it in GitHub Desktop.
val consulta = """select coalesce(sum(ingresos.monto), 0) as total, categorias.categoria from ingresos
inner join categorias on ingresos.idCategoria = categorias.id
where ingresos.fecha between ? and ?
group by ingresos.idCategoria order by total desc limit 3"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment