can group by and order by used together code example Example: how to use order by and group by together SELECT * FROM table GROUP BY m_id ORDER BY timestamp DESC