Skip to content

Instantly share code, notes, and snippets.

@MarioCares
Created February 21, 2014 16:23
Show Gist options
  • Save MarioCares/9137345 to your computer and use it in GitHub Desktop.
Save MarioCares/9137345 to your computer and use it in GitHub Desktop.
Listado Cantidad Atenciones Por Hora
SELECT DATEPART(hh, xfecha) AS CANT, count(*)
FROM [XSAPU].[dbo].[Atenciones]
where id_sapu = 4 and CAST(xfecha as datetime) between '20130601' and '20131231'
group by DATEPART(hh, xfecha)
order by CANT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment