SELECT * FROM (SELECT * FROM (SELECT * FROM `tbl_event` ORDER BY `event_time` DESC) `temp` GROUP BY device_name ORDER BY `event_time` DESC)temp1 WHERE already_revent =1
SELECT id, type, event_time AS createdate , device_name AS cloum ,description,value FROM (SELECT * FROM (SELECT * FROM `tbl_event` ORDER BY `event_time` DESC) `temp` GROUP BY device_name ORDER BY `event_time` DESC)temp1 WHERE already_revent =1
SELECT id, type, event_time AS createdate , device_name AS cloum ,description,value FROM (SELECT * FROM (SELECT * FROM `tbl_event` ORDER BY `event_time` DESC) `temp` GROUP BY device_name ORDER BY `event_time` DESC)temp1 WHERE already_revent =1