假设使用SQL Server 2008或更高版本:
SELECt [Date] = ConVERT(DATE, LogDate), [Sum] = COUNT(*)FROM dbo.Log_Table_NameWHERe [Type] = 'DBError'GROUP BY ConVERT(DATE, LogDate)ORDER BY [Date];

假设使用SQL Server 2008或更高版本:
SELECt [Date] = ConVERT(DATE, LogDate), [Sum] = COUNT(*)FROM dbo.Log_Table_NameWHERe [Type] = 'DBError'GROUP BY ConVERT(DATE, LogDate)ORDER BY [Date];