Need help with an SQL badge query

Oh wow, thank you so much!