We will assume that a student has a study debtif he or she has less than 60 points in that subject.
- Write requests that will remove:
- Students who do not have debts;
- Students who have 3 or more debts;
- Groups in which no students are enrolled.
- Working with debtors
- Create a
Losers
view that shows the number ofLosers
for each student who has debts; - Create a
LoserT
table that contains the same information as theLosers
view. This table should be automatically updated when the points table changes; - Disable the automatic updating of
LoserT
; - Write a query (one) that updates the
LoserT
table using data from the NewPoints table, which contains information about the points awarded on the last day.
- Create a
- Data Integrity
- Add a check that all students in the same group are studying the same set of courses;
- Create a trigger that does not reduce student scores in a course. If you try to make this change, the scores should not change.