Folgende SQL Statements werten die Verteilung der Nachrichteneingänge über der Zeit aus und geben somit Aufschuss über die Zeiten größter Auslastung.
SELECT DATEPART(hour,EntryDate) AS OnHour, COUNT(*) AS Totals FROM [eBiss3].[dbo].[Message] GROUP BY DATEPART(hour,EntryDate) order by OnHour asc
SELECT CAST(EntryDate as date) AS ForDate, DATEPART(hour,EntryDate) AS OnHour, COUNT(*) AS Totals FROM [eBiss3].[dbo].[Message] GROUP BY CAST(EntryDate as date), DATEPART(hour,EntryDate)
DECLARE @TotalMessages INT; SET @TotalMessages = select COUNT(*)from [eBiss3].[dbo].[Message]; SELECT DATEPART(hour,EntryDate) AS OnHour, COUNT(*) AS Totals, CAST(round(COUNT(*) * 100.0 /@TotalMessages, 1) as decimal(5,1)) as Percentage, REPLICATE ( '*' , COUNT(*) * 100.0 /@TotalMessages) as BarGraph FROM [eBiss3].[dbo].[Message] GROUP BY DATEPART(hour,EntryDate) order by OnHour asc