5

Is there a way to know what the rank is in my country by reputation from Stack Overflow?

Such as see rankings by week or month.

  • Related (but not duplicates): meta.stackexchange.com/questions/60876/… and meta.stackexchange.com/questions/171800/… – Doorknob Aug 21 '13 at 13:57
  • 5
    No because not everyone fills out a location. Some fill out non-real locations. For example, Shoggy here would come in first place every time for the "Not looking over your shoulder" location. Also, how would this help? – American Luke Aug 21 '13 at 13:57
  • @Bart thank you for the reply, But seems to be not working – Ruchi Aug 21 '13 at 14:00
  • Edited my link @Ruchi. Some of those are likely to work. What I'm saying is: find an appropriate query, or write your own. But American Luke is right though. – Bart Aug 21 '13 at 14:03
  • 2
    Not to mention *bog – MikeTheLiar Aug 21 '13 at 14:05
  • 2
    Is this some kind of national pride thing? I don't really know why it matters how you rank relative to other people in your country. Wouldn't you be more interested in how you rank compared to other experts in your field? We have that, check the tag user stats. – Cody Gray Aug 21 '13 at 14:08
  • 1
    Not sure about Countries, but I know I am top of the "users called musefan" category... it's my proudest achievement to date :D – musefan Aug 21 '13 at 14:14
5

I have created the following query for you, to list your rank among users based on a location.

select row_number() over(order by reputation desc)
     , reputation
     , views
     , case when upvotes > 0 then cast(downvotes as decimal)/upvotes else 0 end as [d/u rate]
     , id as [User Link]
     , location
from users
where location like '%' + ##location:string## + '%' collate SQL_Latin1_General_CP1_CI_AI
order by reputation desc

I leave it as an exercise for the reader to add joins with the posts table to include question and answer counts. Use the great tutorial to learn how that can be done.

When run today you'll find yourself on spot 6:

enter image description here

It isn't doable to determine what your position was last week, last month or last year because that would require to recalculate your reputation and that of your peers for that specific moment in time which is both incomplete due to missing data and the query will run longer then 2 minutes causing a timeout.

You can however run this every week, preferable after the update of SEDE on Sunday, to see if you are making progress.

  • Right now the query gives error: Invalid column name 'age'. – roalz Sep 22 '18 at 13:53
  • @roalz yeah, the age column was removed from the SEDE schema due to the implementation of GDPR. I have adapted the query by removing that field and it now runs again. Thanks for reporting. – rene Sep 22 '18 at 13:59

You must log in to answer this question.

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