I have the following simple query to estimate the time a student has left on a waitlist:
Code:
SELECT StudentName, ((Date()-ApplyDate)/(origwaitlistnum-waitlistnum)) AS DaysPerSlot, Waitlistnum*avg(DaysPerSlot) as TimeTillAccepted
FROM [Prospective Student];
DaysPerSlot is how many days it takes that student to move up one spot in the wait list. Waitlistnum is, of course, their current position on the list.
When I run this query, however, I get the error: Your query does not contain StudentName as part of an aggregate function.
I do not understand why this keeps throwing errors--is there a way to multiply the WaitlistNum by the average of DaysPerSlot? I can't think of any way to do it without an aggregate function involved somehow.
Thanks for the help!