I am having some confusion with a mysql query. Any help appreciated.
My current query:
SELECT
r.name
, r.network
, i.name
, d.dtime
, d.input
FROM router AS r
INNER JOIN interface AS i
ON r.rid = i.rid
INNER JOIN 1273118400_1_60 AS d
ON i.id = d.id
AND dtime BETWEEN 1273152000 AND 1273153800 WHERE i.status = "active"
Now I am using Unix_Timestamp for the time interval between which I am querying.
Right now I am getting results for :
1273152000, 1273152001, 1273152002 and so on.
I want to get at an interval of 60 seconds, like :
1273152000, 1273152060, 1273152120 and so on.
Any idea how I could go about it????
Please help.
Thank you,
Jillika
I’m not sure if it can be simplified further, but you may want to try the following:
Test case:
Result: