📅  最后修改于: 2022-03-11 14:55:29.648000             🧑  作者: Mango
# Here, I am plucking student_id and student_grade based on the distinct student_grade records
StudentResult.distinct(:student_grade).pluck(:student_id, :student_grade)