How to get all of the values in the table?

In mysql there is a table news, which contains news. Here are some of her fields:
id | category_id | title | text | author | views

Field category_id is a numeric value 1, 2, 3 or 4.

Question: how one request to rank the sample from a database at the "popular" category and return the number of materials used in all the categories?
July 2nd 19 at 13:10
3 answers
July 2nd 19 at 13:12
use group by and order by
July 2nd 19 at 13:14
July 2nd 19 at 13:16
can you?
SELECT id, COUNT(id) as counter, category_id, title, text, author, views FROM news GROUP BY id ORDER BY 2
Not some nonsense.. - Marielle_Rice commented on July 2nd 19 at 13:19

Find more questions by tags MySQLSQL