Skip to content

Instantly share code, notes, and snippets.

@parzibyte

parzibyte/13.sql Secret

Created December 29, 2020 03:10
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/548896007a9915c489b27fe84c3c2928 to your computer and use it in GitHub Desktop.
Save parzibyte/548896007a9915c489b27fe84c3c2928 to your computer and use it in GitHub Desktop.
# Mostrar todos los registros, pero agregar una columna extra. Si la temperatura es mayor o igual a 17 grados centígrados, imprimir Calor. Si no, imprimir Frio.
SELECT date, temperature, humidity, IF(temperature >= 17, "Calor", "Frio")
FROM dht_log;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment