valdemirs (valdemirs (AT) gmail (DOT) com) writes:
Quote:
Please, is there any way to summarize this sql command below to show
me only one data per day ? |
To show data once per day:
SELECT Nodes.Caption AS NodeName,
APM_AlertsAndReportsData.ComponentName AS Component_Name,
AVG(APM_ResponseTime.StatisticData) AS StatisticsData,
convert(char(10), APM_ResponseTime.DateTime, 112) AS DateTime
FROM ...
GROUP BY Nodes.Caption, APM_AlertsAndReportsData.ComponentName,
convert(char(10), APM_ResponseTime.DateTime, 112)
To group by the hour, just change char(10) to char(13)
--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx