Badge SQL Error: q.user_id

How does this differ from the Add Badge to Solve answer topic? I am looking to do the same thing but unsure if either one would be applied for every solution or a set number?