select count(user_id)
from photos
group by user_id ;
4
3
1
2
1
1
12
5
1
4
8
2
1
4
5
2
1
2
1
1
3
5
4
4
5
1
3
5
5
1
1
8
10
2
1
2
4
5
5
3
1
1
5
1
6
5
1
2
2
2
9
4
11
3
2
1
2
3
2
1
3
2
select avg(count(user_id))
from photos
group by user_id;
Error Code: 1111. Invalid use of group function
How to get average of this column
2
Answers
I guess this should be it :
Do you want an average over the entire aggregated table?