i got error
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM xydata a
INNER JOIN fm4features f ON f.id = a.' at line 5
Code:
SELECT gpstime,
MIN(gpstime) `mn`,
MAX(gpstime) `mx`,
SEC_TO_TIME(SUM(TIME_TO_SEC(TIMEDIFF(max(gpstime), min(gpstime))))) AS totalworktime
FROM xydata a
INNER JOIN fm4features f ON f.id = a.id
WHERE objectid = 17
AND clientid = 1
AND gpstime > '2010-05-11 00:00:00'
AND gpstime < '2010-05-11 23:59:59'
AND f.dataid = 1
AND f.VALUE = '1'
AND gpstime IS NOT NULL
GROUP BY Date_format(gpstime, '%Y-%m-%d')
ORDER BY gpstime ASC
how to solve this error please help me