3
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, are 3 courses that occur over three months, and courses 1 and 2 structures "daughters". Course 1, has 2 classes (A and B), and the A can happen in the morning or afternoon. Course 2 has only class A and course 3 has no detailed "daughter" structures.
The 4th line and the respective ones of Course 1 for the other months, is nothing more than the totalizer (sum) of the structures "daughters". The same goes for the 6th line (Course 2).
Is there any way to filter my database so that these totalizing lines are deleted? (Note that Course 3 should be maintained)
I thought of a solution this way, but since I have many variations, I was looking for something more automatic.
– Rafael Cunha
@Rafaelcunha if you put your problem with multiple variables, I can try to solve otherwise.
– Daniel Ikenaga