How can I specify their own sorting rule for a query?

Good day!
There is a table in which to store the history of treatment of clients(companies) for the provision of services. For definiteness, the table has fields: id, id_company, date. Asking a typical query to this table and sort by last access date (nothing special).
Ask such a question, is it possible to ask your collation result of the query to the same company in a row did not stand, if possible. Output similar to this:
id_company | date
1-------------1.09.2016
2-------------29.08.2016
3-------------26.08.2016
1-------------30.08.2016
2-------------28.08.2016
3-------------25.08.2016
1-------------29.08.2016
3-------------22.08.2016
3-------------20.08.2016
Ideally, to have it all in one query (by date and its sorted)
July 4th 19 at 23:56
2 answers
July 4th 19 at 23:58
ORDER BY `date`, `id_company`
July 5th 19 at 00:00
To one and the same company in a row was not - called group
you can try this:
SELECT id_company,MAX(date) FROM table GROUP BY id_company ORDER BY MAX(date) DESC
This query displays only one record for each company - watson_Torphy commented on July 5th 19 at 00:03

Find more questions by tags MySQLSQL