SELECT counter.timestamp, counter.wert, UNIX_TIMESTAMP(counter.timestamp) AS unix_time, STATUS.wert FROM Counter.`99999910` AS counter, alt.`statusanz` AS STATUS WHERE (UNIX_TIMESTAMP(counter.timestamp) BETWEEN 1295859173 AND 1295869173) AND (UNIX_TIMESTAMP(STATUS.Zeitstempel) BETWEEN counter.timestamp AND counter.timestamp) ORDER BY timestamp ASC