SQL count per date (distinct)
- skarbnik

- Nov 4, 2015
- 1 min read
SELECT date = CONVERT(DATE, STARTDATETIME), count = count (distinct [UCID])
FROM [NAV360DataSummary].[dbo].[TBL_REPORT_MAIN] where [STARTDATETIME] between '2015-05-01 00:00:00.000' and '2015-06-01 23:59:59.000' and [MODULE_NAME] = 'R120_0'
GROUP BY CONVERT(DATE, STARTDATETIME)
ORDER BY date;


Comments