I Have a table like given below, the table name is tag.
id fileid
== ======
1 1
2 2
3 2
4 2
5 3
6 3
7 3
I need to find the number of occurrences of each fileId. So the output need to be something like this:
fileId count
====== =====
1 1
2 3
3 3
Can somebody help me with writing this MySQL query?
try