So I have this table called students_classrooms which represents the relationship between students and classrooms. I have been wondering if there is a way I could get for each classroom one randomly assign student only with SQL query.
Looking for result like this: classroom - student (2,3)(3,77)
students are selected ranmdomly.
I have been trying different configurations solutions, but non of them seems to be working, would appreciate any suggestions, thanks!!
SELECT student_id, classroom_id
from students_classrooms
where classroom_id in (2,3)