D
D
Danil2016-06-02 09:54:05
MySQL
Danil, 2016-06-02 09:54:05

How to get unique value and number of non-unique values ​​in total?

There is a query like:
'SELECT DISTINCT `brend` FROM `brend_list`;
It returns unique values brend​​from the table brend_list
Tell me how to make a query that will return me the same as the query above + the number of repetitions of each brend?
Should get something like { brend:brend1, count:countOfBrend1 }and so on

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question