DECLARE @DATAINICIAL DATE = '20170101'
DECLARE @DATAFINAL DATE = '20170110'
DECLARE @NUMNOTAS INT
WHILE @DATAINICIAL <= @DATAFINAL
BEGIN
SELECT @NUMNOTAS = COUNT(*) FROM [NOTAS FISCAIS] WHERE DATA = @DATAINICIAL
PRINT 'Data:' + CONVERT(VARCHAR(10), @DATAINICIAL) + ' | QTDE_NFs:'
+ CONVERT(VARCHAR(10), @NUMNOTAS)
SELECT @DATAINICIAL = DATEADD(DAY, 1, @DATAINICIAL)
END