MySQL Forums
Forum List  »  PHP

Re: nested select statement syntax error
Posted by: Peter Brawley
Date: July 16, 2006 01:28PM

Something like ...

SELECT ABS(t1.recv-t2.recv) AS Diff
FROM tbl AS t1
INNER JOIN tbl AS t2 ON t1.timestamp = t2.timestamp - INTERVAL 5 MINUTE
ORDER BY Diff DESC
LIMIT 1;

?

PB

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.