Need help with an SQL badge query

哇,太感谢你了!