list(db.codes.find({}).distinct("group"))
db.codes.find 접속한 데이터베이스 codes에서 딕셔너리에서 group이 키인 것을 찾는다 group인 것을 중복 제외
find할 때 딕셔너리 형으로 조건 넣기