I am new to Moodle world I want to know how to link mdl_question to mdl_quiz in SQL.
I need to filter qtype in mdl_question table in order to get any quiz contain essay type question.
Thanks in advance
I have solved it myself . it should link through mdl_quiz_slots.
select q.* from mdl_question q
join mdl_quiz_slots qs
on qs.questionid = q.id
join mdl_quiz qz
on qz.id = qs.quizid