OK, but there is no way to tell what period of time is involved in the percentage calculation for two reasons:
1) the date range min (stuattend.date) and max (stuattend.date) is always the same (the range is fixed in the SELECT statement)
2) the percentage numbers are always the same, regardless of the date range I enter in the search form.
These two reasons are telling us the calculation is always performed on the same amount of records, no? To see for yourself please see the private message below.