Created
February 24, 2014 11:21
-
-
Save MarioCares/9186663 to your computer and use it in GitHub Desktop.
Listado Cantidad Atenciones, Por Mes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT month(xfecha) AS MES, DATEPART(hh, xfecha) AS HORA, count(*) | |
FROM [XSAPU].[dbo].[Atenciones] | |
where id_sapu = 4 and CAST(xfecha as datetime) between '20130601' and '20131231' | |
group by month(xfecha), DATEPART(hh, xfecha) | |
order by MES, HORA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment