your communities

What percentage of users possess at least one gold badge? Just curious.

share|improve this question
Good question. I just noticed that the data dump doesn't include the badge colours, so they would have to be hand-coded from the /badges/ page. –  Greg Hewgill Aug 28 '09 at 7:11
add comment

2 Answers

up vote 5 down vote accepted

My results based on Aug 6 data dump, with catch one small catch: it does not include tag-specific badges (like java gold). I am working on that now, but it requires a bit of massaging.

  • 610 users have gold
  • 866 gold badges
  • 60556 users have at least one badge
  • 103659 users total
  • 20428 users have reputation > 100

So, that gives us a couple of statistics like

  • 1.01% of users with at least one badge have a gold
  • 0.59% of all users have a gold
  • 2.99% of users with with reputation > 100 have gold
share|improve this answer
Is this for SO only or for all the sites? –  Juha Syrjälä Aug 30 '09 at 8:37
The public data dumps only over SO, to date. –  Stu Thompson Aug 30 '09 at 9:44
Any chance this could be run again to see no of golds we have now? –  kevchadders Feb 12 '13 at 8:48
add comment

At the moment of this writing, SO has 988 owners of gold badges, counted from the badges page manually. The users page shows 2527*35 + 11 = 88456 users. Therefore 998/88456 * 100 = 1.1169 % of the user at the time of writing have a gold badge. (These are not distinct users, so there are less people awarded, this is an upper boundary).

There is a way to calculate this, searching for all badges and the number of users. For a hint:

select Count(distinct userid) from badges 
  where name = "famous question" or name = "fanatic" ...
select Count(*) from users
share|improve this answer
Do you mean "988 gold badges, but not unique owners of gold"? Many badges can be awarded more than once. –  Stu Thompson Aug 28 '09 at 8:30
Gah! Use in, not or. or is rarely if ever optimized in SQL. where name in ('famous question', 'fanatic', ...). Often times, in is made into a hash table for SQL to run a hash join against. ors are never given this awesomely special treatment. Each value of the or is evaluated for every row. And that makes me a sad panda. –  Eric Aug 28 '09 at 11:37
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .