text: SELECT (
  		DATEADD(
  			SECOND, 
  			DATEDIFF(SECOND, MIN(TIME), MAX(TIME)) / 2,
  			MIN(TIME)
  		)) AS TIME, 
  FK_ID_SIGNATURE, FK_ID_PARENT, SUM(COUNT) AS COUNT, MIN(MIN) AS MIN, AVG(AVG) AS AVG, MAX(MAX) AS MAX,  MAX(GRANULARITY) AS MAX_GRANULARITY
  FROM CFW_STATS_CPUSAMPLE
  WHERE TIME >= ? 
  AND TIME <= ? 
  GROUP BY FK_ID_SIGNATURE, FK_ID_PARENT;