There is such a database with tables.
Suppose there are 3 sections (sections), each section has a different number of lessons (lessons), for each account there is a report (reports) for each lesson. The checked state can be changed only by a certain group of users.
Essence of the question:
There is some kind of account id. We must get a sample of the sections that he passed. Let's say if the user with id = 100 has passed all the lessons of section 1 (passed: reports.checked = 1), and 2 lessons from 5 to 2 sections, then the query should return data only for 1 section.
Request to the studio please
