title: Deleting records from one table if all records are equal to a specific value
body: <p><strong>Student Table</strong></p>
  <pre><code>Student_ID  School          Home State  Grade      Age
  85          Washington St   Colorado    Junior     22
  90          Washington St   Washington  Senior     23
  81          Oregon          California  Junior     21
  21          Washington      Washington  Sophomore  21
  </code></pre>
  <p><strong>Attendance Table</strong></p>
  <pre><code>Student_ID  Active  Date
  85          N       9/22/20
  85          N       9/21/20
  81          Y       9/22/20
  81          N       9/21/20
  </code></pre>
  <p>Hey in an Oracle DB if I want to go clean up the table with the student's information by seeing who is still an active student. By sorting by Student_ID in the attendance table I want to find students if they have all values for which active = 'N'. If all values for each student active = 'N' then I know they are no longer a student, I would like to delete the records from the Student table (student 85). However, if only on records for each student has Active = 'Y', then I won't delete anything with that student as I know they're still active (student 81). What would the best way to go about this, I have tried to use the all operator but I've been unable to get the results desired. Below is the query I have been trying to use.</p>
  <pre><code>DELETE /*+ parallel (a) */ FROM STUDENT a 
  WHERE ( a.student_ID  = ALL
  (SELECT /*+ parallel (b) */ b.student_id, b.active FROM attendance b WHERE b.active = 'N')); 
  </code></pre>