qapper.net

SELECT SUM(a.nBytesTotal) AS nBytesTotal, a.sensor, SUM(minCalc) / (UNIX_TIMESTAMP(MAX(a.dTUTCMax)) - UNIX_TIMESTAMP(MIN(a.dTUTCMin))) AS auslastungMin, SUM(avgCalc) / (UNIX_TIMESTAMP(MAX(a.dTUTCMax)) - UNIX_TIMESTAMP(MIN(a.dTUTCMin))) AS auslastungAvg, SUM(maxCalc) / (UNIX_TIMESTAMP(MAX(a.dTUTCMax)) - UNIX_TIMESTAMP(MIN(a.dTUTCMin))) AS auslastungMax FROM `tbInfoE2I` AS a WHERE a.dTUTCMax > UTC_TIMESTAMP - INTERVAL 1 HOUR AND sensor < 6 AND sensor != 4 GROUP BY a.sensor UNION ALL ( SELECT SUM(a.nBytesTotal) AS nBytesTotal, a.sensor, SUM(infoMin * ctr) * 100 / (UNIX_TIMESTAMP(MAX(a.dTUTCMax)) - UNIX_TIMESTAMP(MIN(a.dTUTCMin))) AS auslastungMin, SUM(infoAvg * ctr) * 100 / (UNIX_TIMESTAMP(MAX(a.dTUTCMax)) - UNIX_TIMESTAMP(MIN(a.dTUTCMin))) AS auslastungAvg, SUM(infoMax * ctr) * 100 / (UNIX_TIMESTAMP(MAX(a.dTUTCMax)) - UNIX_TIMESTAMP(MIN(a.dTUTCMin))) AS auslastungMax FROM `tbInfoE3I` AS a WHERE a.dTUTCMax > UTC_TIMESTAMP - INTERVAL 1 DAY AND sensor BETWEEN 6 AND 9 GROUP BY a.sensor ) UNION ALL ( SELECT SUM(a.nBytesTotal) AS nBytesTotal, a.sensor, SUM(infoMin * ctr) * 100 / (UNIX_TIMESTAMP(MAX(a.dTUTCMax)) - UNIX_TIMESTAMP(MIN(a.dTUTCMin))) AS auslastungMin, SUM(infoAvg * ctr) * 100 / (UNIX_TIMESTAMP(MAX(a.dTUTCMax)) - UNIX_TIMESTAMP(MIN(a.dTUTCMin))) AS auslastungAvg, SUM(maxCalc) / (UNIX_TIMESTAMP(MAX(a.dTUTCMax)) - UNIX_TIMESTAMP(MIN(a.dTUTCMin))) AS auslastungMax FROM `tbInfoE4I` AS a WHERE a.dTUTCMax > UTC_TIMESTAMP - INTERVAL 1 WEEK AND sensor BETWEEN 10 AND 15 GROUP BY a.sensor );13.6
0.0065860748291

Availability - Productivity - Quality