Leser: 30
1
2
3
4
5
6
7
8
9
10
SELECT c.timestamp, c.wert, count( a.wert ) , avg( a.wert )
FROM Counter.`99999910` AS c
LEFT JOIN alt.`statusanz` AS a ON a.Zeitstempel
BETWEEN c.timestamp - 0.005
AND c.timestamp + 0.005
WHERE UNIX_TIMESTAMP( c.timestamp )
BETWEEN 1295859173
AND 1295869173
GROUP BY c.timestamp
LIMIT 0 , 30
1
2
3
4
5
6
7
SELECT c.timestamp, c.wert, UNIX_TIMESTAMP(c.timestamp) AS unix_time, a.wert
FROM (SELECT c.timestamp AS stamp1, max(a.Zeitstempel) AS stamp2
FROM Counter.`99999910` as c
LEFT JOIN alt.`statusanz` AS a ON c.timestamp >= a.Zeitstempel
GROUP BY c.timestamp)
LEFT JOIN c ON c.timestamp = stamp1
LEFT JOIN a ON a.Zeitstempel = stamp2;
1
2
3
4
5
6
7
8
9
10
11
SELECT c.timestamp, c.wert, UNIX_TIMESTAMP( c.timestamp ) AS unix_time, a.wert
FROM (
SELECT c.timestamp AS stamp1, max( a.Zeitstempel ) AS stamp2
FROM Counter.`99999910` AS c
LEFT JOIN alt.`statusanz` AS a ON c.timestamp >= a.Zeitstempel
GROUP BY c.timestamp
) AS jdhhe
LEFT JOIN c ON c.timestamp = stamp1
LEFT JOIN a ON a.Zeitstempel = stamp2
LIMIT 0 , 30
1
2
3
4
5
6
7
8
9
10
11
SELECT Counter.`99999910`.timestamp, Counter.`99999910`.wert, UNIX_TIMESTAMP( Counter.`99999910`.timestamp ) AS unix_time, alt.`statusanz`.wert
FROM (
SELECT c.timestamp AS stamp1, max( a.Zeitstempel ) AS stamp2
FROM Counter.`99999910` AS c
LEFT JOIN alt.`statusanz` AS a ON c.timestamp >= a.Zeitstempel
GROUP BY c.timestamp
) AS jdhhe
LEFT JOIN Counter.`99999910` ON Counter.`99999910`.timestamp = stamp1
LEFT JOIN alt.`statusanz` ON alt.`statusanz`.Zeitstempel = stamp2
LIMIT 0 , 30