Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

How can I distinguish between the levels of badges for a particular tag, say , querying SEDE?

For example, Mr. Jon Skeet has all the gold, silver and bronze badges for LINQ, so the query

select *
from Badges b with (nolock)
    b.Name = 'linq'
and b.UserId = 22656

returns 3, with no distinction between them.

Is it possible to include such information into the dump, for example, keep a unique badge ID (40 for the gold badge)?

share|improve this question
You can deduce that he earned the bronze badge first and the gold one last. – NullUserException อ_อ Dec 2 '11 at 22:45
But yeah, currently there's no distinction between them in the datadump. – NullUserException อ_อ Dec 2 '11 at 22:45
up vote 2 down vote accepted

It's too bad, but I guess the only thing you can do is this Data.SE query:

WITH linqbadges
     AS (SELECT Rank() OVER (PARTITION BY b.userid ORDER BY b.DATE) rn,
         FROM   badges b
         WHERE = 'linq')
SELECT u.displayname,
       linqbadges.DATE AS date_earned,
       CASE rn
         WHEN 1 THEN 'bronze linq'
         WHEN 2 THEN 'silver linq'
         WHEN 3 THEN 'gold linq'
       END             AS badge
FROM   linqbadges
       INNER JOIN users u
         ON linqbadges.userid =

The real trouble is that you can't tell a tag badge from a regular badge.

share|improve this answer
A tag badge has a lowercase first letter, and a regular badge has a capital. Not the coolest to rely on, for sure... – corsiKa Dec 13 '12 at 20:18
@corsiKa yep you're right. Badge Per User – Some Helpful Commenter Dec 13 '12 at 22:06

You must log in to answer this question.

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