I have the following structure of a database:
MES EST.DET1 EST.DET2 EST.DET3 DIAS
2 Curso 1 Turma A Manha 5
2 Curso 1 Turma A Tarde 5
2 Curso 1 Turma B <NA> 5
2 Curso 1 <NA> <NA> 15
2 Curso 2 Turma A <NA> 7
2 Curso 2 <NA> <NA> 7
2 Curso 3 <NA> <NA> 10
3 Curso 1 Turma A Manha 6
3 Curso 1 Turma A Tarde 6
3 Curso 1 Turma B <NA> 6
3 Curso 1 <NA> <NA> 18
3 Curso 2 Turma A <NA> 7
3 Curso 2 <NA> <NA> 7
3 Curso 3 <NA> <NA> 13
4 Curso 1 Turma A Manha 5
4 Curso 1 Turma A Tarde 5
4 Curso 1 Turma B <NA> 5
4 Curso 1 <NA> <NA> 15
4 Curso 2 Turma A <NA> 6
4 Curso 2 <NA> <NA> 6
4 Curso 3 <NA> <NA> 10
Basically, there are 3 courses that occur over three months, with courses 1 and 2 structures "daughters". Course 1, has 2 classes (A and B), and A can happen in the morning or afternoon. Course 2 has only class A and course 3 does not have detailed "daughter" structures.
The 4th line and the corresponding ones of Course 1 for the other months, is nothing more than the totalizer (sum) of the "daughter" structures. The same goes for the 6th line (Course 2).
Is there any way to filter my database so that these totems are deleted? (It should be noted that Course 3 should be maintained)