HeaderReturn to UO Computing Center Page
Administrative Services Header

[Home | Announcements | Access | Installation | User Notes | Data Dictionary | Mailing List | Contact]

Selecting Stopouts Using Subqueries

We'll define a "stopout" as an undergraduate student who attended last term but who is not attending this term and who did not graduate. In our example our list will be limited to Anthropology majors.

You'll use one subquery to eliminate from our list students who have graduated and you'll use another to eliminate students who are attending this term.

In the first subquery, you need to identify every student who has had a degree awarded at the UO. Then you'll use a NOT IN qualifier in our main query.

To define the first subquery:

  1. Go to All Terms Student Model 2.
  2. Select New Query from the Query menu.
  3. Open the Degree(2) object.
  4. Select Warehouse ID.
  5. Qualify Inst Transfer Flag = I.
  6. Qualify Degree Status = AW.
  7. Qualify Level Code = UG.
  8. Select Save Query from the Query menu.
  9. Type a descriptive name for the query (like "UG Degrees Awarded") in the Query Name field.
  10. Click save.

In the second subquery, you need to identify students who are enrolled the current term. Then you'll use another NOT IN qualifier in your main query.

To define the second subquery:

  1. Select New Query from the Query menu.
  2. Open the All Students object.
  3. Select Warehouse ID.
  4. Qualify Hours Registered > 0.
  5. Qualify TERM = the current term (e.g., 199602).
  6. Qualify Level Code = UG.
  7. Select Save Query from the Query menu.
  8. Type a descriptive name for the query (like "Current UGs") in the Query Name field.
  9. Click save.

Now for the main query. In it you'll select the Anthro majors here last term, using the subqueries to exclude those with degrees and those here this term.

To define the main query:

  1. Select New Query from the Query menu.
  2. Open the Person(2) object.
  3. Select STUDENT ID and LFM Name.
  4. Close the Person(2) window and open the All Students object.
  5. Qualify TERM = last term (e.g., 199601).
  6. Qualify Student Level Code = UG
  7. Qualify Hours Registered > 0.
  8. Qualify All Majors contains |ANTH|
  9. Now you need to use your first subquery to eliminate the students who have a degree. To do this first, qualify on WAREHOUSE ID and choose the NOT IN qualifier.
  10. Select Insert Subquery from the Edit menu.
  11. In the Saved Queries list, select the subquery 'UG Degrees Awarded' that we created above. Press the Load button and the query name will appear in the qualification box.
  12. Next you need to use your second subquery to eliminate currently enrolled students. Qualify WAREHOUSE ID again and choose the NOT IN qualifier.
  13. Select Insert Subquery from the Edit menu.
  14. In the Saved Queries list, select the subquery 'Current UGs' that you created above. Press the Load button and the query name will appear in the qualification box.
  15. Run the query.

WARNING: using subqueries may cause your queries to take a long time to run. Using the example above it took an hour and forty-five minutes to get a list.


This page was last updated on March 31, 1997.

[Home | Announcements | Access | Installation | User Notes | Data Dictionary | Mailing List | Contact]
Contact information below
© 2002; University of Oregon, Eugene OR 97403; (541) 346-1000 Return to UO Home Page
Comments? hilton@oregon.uoregon.edu