select *
from WeeklyChallengeCourses
where weekly_challenge_id = (select weekly_challenge_id
from WeeklyChallengeCourses
where course_id = 210);
Result will be the below selected one:
const data = await context.prisma.weeklyChallengeCourses.findMany({
where:{
weekly_challenge_id: {
..............
}
},
});