Organizational Research By

Surprising Reserch Topic

how to find the Number of string occurrences in mysql query


I have a list of cars

id | brand | model
1  | bmw   | 525
1  | bmw   | 533
2  | audi  | a8
...

I want to take brand occurrences specific to id, for this example:

id | brand | model | n
1  | bmw   | 525   | 2
1  | bmw   | 533   | 2
2  | audi  | a8    | 1
...

Please, i need help with this.

asked Jun 9, 2015 in MYSQL by rajesh
0 votes
31 views



Related Hot Questions



Government Jobs Opening


...