Skip to content

Instantly share code, notes, and snippets.

@marcoah
Created July 10, 2018 06:32
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 marcoah/cbcde88095cbe244b6390511d24624af to your computer and use it in GitHub Desktop.
Save marcoah/cbcde88095cbe244b6390511d24624af to your computer and use it in GitHub Desktop.
Para construir histogramas (seleccionar datos por rango)
Select CASE WHEN prof < 10 THEN 'Menor a 10'
WHEN prof between 10 AND 20 THEN 'Entre 10 y 20'
ELSE 'Mayor a 20' END as Rango, Count(*) as Cantidad
FROM Perforaciones group by Rango
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment